  #ifdef USE_INSN_RET_NUM
  static int
  insn_ret_num(VALUE insn)
+

===================================================================
--- tool/instruction.rb	(revision 25565)
+++ tool/instruction.rb	(working copy)
@@ -854,6 +854,7 @@
       commit "INSN_ENTRY(#{insn.name}){"
       make_header_prepare_stack insn
       commit "{"
+      commit "  TRACE_INSN(#{insn.name});"
       make_header_stack_val  insn
       make_header_default_operands insn
       make_header_operands   insn

+#endif
+
+#define TRACE_INSN(insn) do { \
+  EXEC_EVENT_HOOK(th, RUBY_EVENT_INSN, GET_SELF(), 0, 0); \
+} while (0)
+
 #ifdef  COLLECT_USAGE_ANALYSIS
 #define USAGE_ANALYSIS_INSN(insn)           vm_analysis_insn(insn)
 #define USAGE_ANALYSIS_OPERAND(insn, n, op) vm_analysis_operand(insn, n, (VALUE)op)
@@ -28,12 +62,14 @@
 #define USAGE_ANALYSIS_REGISTER(reg, s)		/* none */
 #endif
 
