aboutsummaryrefslogtreecommitdiffstats
path: root/vm_exec.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-14 12:58:36 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-14 12:58:36 +0000
commitdf9d4a5b0cbda637f2ad17124b36db9062538f0c (patch)
tree31357897b60fbef63947d89ad7cd0f0ae95025bc /vm_exec.h
parentce37c85e1b68b44271fc988471d1a2027a713cc8 (diff)
downloadruby-df9d4a5b0cbda637f2ad17124b36db9062538f0c.tar.gz
remove `trace` instruction. [Feature #14104]
* tool/instruction.rb: create `trace_` prefix instructions. * compile.c (ADD_TRACE): do not add `trace` instructions but add TRACE link elements. TRACE elements will be unified with a next instruction as instruction information. * vm_trace.c (update_global_event_hook): modify all ISeqs when hooks are enabled. * iseq.c (rb_iseq_trace_set): added to toggle `trace_` instructions. * vm_insnhelper.c (vm_trace): added. This function is a body of `trace_` prefix instructions. * vm_insnhelper.h (JUMP): save PC to a control frame. * insns.def (trace): removed. * vm_exec.h (INSN_ENTRY_SIG): add debug output (disabled). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_exec.h')
-rw-r--r--vm_exec.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/vm_exec.h b/vm_exec.h
index 2acfad051a..3bfdd569d1 100644
--- a/vm_exec.h
+++ b/vm_exec.h
@@ -74,8 +74,12 @@ error !
#define ELABEL(x) INSN_ELABEL_##x
#define LABEL_PTR(x) &&LABEL(x)
-#define INSN_ENTRY_SIG(insn)
-
+#define INSN_ENTRY_SIG(insn) \
+ if (0) fprintf(stderr, "exec: %s@(%d, %d)@%s:%d\n", #insn, \
+ (int)(reg_pc - reg_cfp->iseq->body->iseq_encoded), \
+ (int)(reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), \
+ RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
+ (int)(rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)));
#define INSN_DISPATCH_SIG(insn)