diff options
author | Sverker Eriksson <[email protected]> | 2014-04-25 23:02:26 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-04-29 16:17:56 +0200 |
commit | c4cdb1847e09d1153a6044d7a6aac05db4fad515 (patch) | |
tree | 6bbb66be7b53e2532caee29ee0ff455416e9b2af /erts/emulator/hipe/hipe_mode_switch.h | |
parent | 23246d73bbd3188e2c0a45408b9bd29fd034ccaf (diff) | |
download | otp-c4cdb1847e09d1153a6044d7a6aac05db4fad515.tar.gz otp-c4cdb1847e09d1153a6044d7a6aac05db4fad515.tar.bz2 otp-c4cdb1847e09d1153a6044d7a6aac05db4fad515.zip |
erts: Fix global tracing of beam function when called from hipe code
Make hipe to beam calls use export entry.
Makes it a lot easier to handle global tracing correctly
(breakpoints in export entry). A beam function should now be traced
correctly regardless how it is called.
This will also fix a SEGV crash when a hipe stub is made pointing into
a traced export entry and tracing is then stopped which clears the export
entry causing the hipe stub to execute beam instruction NULL.
This commit assumes that hipe code never calls local beam functions, which
should be the case nowadays as we only hipe compile entire modules.
Diffstat (limited to 'erts/emulator/hipe/hipe_mode_switch.h')
-rw-r--r-- | erts/emulator/hipe/hipe_mode_switch.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.h b/erts/emulator/hipe/hipe_mode_switch.h index 06721e3c04..6ec5da1ae9 100644 --- a/erts/emulator/hipe/hipe_mode_switch.h +++ b/erts/emulator/hipe/hipe_mode_switch.h @@ -31,7 +31,7 @@ /* result codes for beam_emu <- hipe_mode_switch() return */ #define HIPE_MODE_SWITCH_RES_RETURN 4 -#define HIPE_MODE_SWITCH_RES_CALL 5 +#define HIPE_MODE_SWITCH_RES_CALL_EXPORTED 5 #define HIPE_MODE_SWITCH_RES_THROW 6 /* additional result codes for hipe_mode_switch() <- native return */ @@ -45,6 +45,8 @@ #define HIPE_MODE_SWITCH_RES_APPLY 13 /* mode_switch <- native */ +#define HIPE_MODE_SWITCH_RES_CALL_BEAM 14 + #ifndef ASM #include "error.h" |