aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/trace_instrs.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-09-04 15:25:58 +0200
committerBjörn Gustavsson <[email protected]>2017-09-11 15:22:42 +0200
commitbffbd4fb504e9551fc7feb9177ef0a2394c00cae (patch)
tree5be0ecd25f043cfa7d7fd39391105c8d25f3a522 /erts/emulator/beam/trace_instrs.tab
parent9674613dd9d1c5ac026c9bff05ea19df2886a2c3 (diff)
downloadotp-bffbd4fb504e9551fc7feb9177ef0a2394c00cae.tar.gz
otp-bffbd4fb504e9551fc7feb9177ef0a2394c00cae.tar.bz2
otp-bffbd4fb504e9551fc7feb9177ef0a2394c00cae.zip
Introduce a new trace_jump/1 instruction for tracing
As a preparation for introducing relative jumps, introduce "trace_jump W" that can be used for tracing. This instruction will continue to have an absolute address for the jump target. (Note: This instruction is never created during loading; it is only created in stubs when tracing is active.)
Diffstat (limited to 'erts/emulator/beam/trace_instrs.tab')
-rw-r--r--erts/emulator/beam/trace_instrs.tab13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/trace_instrs.tab b/erts/emulator/beam/trace_instrs.tab
index c71f2ef003..c28bc8ebcb 100644
--- a/erts/emulator/beam/trace_instrs.tab
+++ b/erts/emulator/beam/trace_instrs.tab
@@ -153,3 +153,16 @@ i_debug_breakpoint() {
goto handle_error;
//| -no_next
}
+
+
+
+//
+// Special jump instruction used for tracing. Takes an absolute
+// failure address.
+//
+
+trace_jump(Fail) {
+ //| -no_next
+ SET_I((BeamInstr *) $Fail);
+ Goto(*I);
+}