Watson1978
1/31/2019 - 7:56 AM

dtrace.patch

diff --git a/vm_eval.c b/vm_eval.c
index a8764e2fa4..a278fe3a2e 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -46,6 +46,7 @@ rb_vm_call0(rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE
     struct rb_calling_info calling_entry, *calling;
     struct rb_call_info ci_entry;
     struct rb_call_cache cc_entry;
+    VALUE val;
 
     calling = &calling_entry;
 
@@ -57,7 +58,10 @@ rb_vm_call0(rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE
     calling->recv = recv;
     calling->argc = argc;
 
-    return vm_call0_body(ec, calling, &ci_entry, &cc_entry, argv);
+    RUBY_DTRACE_METHOD_ENTRY_HOOK(ec, me->owner, me->def->original_id);
+    val = vm_call0_body(ec, calling, &ci_entry, &cc_entry, argv);
+    RUBY_DTRACE_METHOD_RETURN_HOOK(ec, me->owner, me->def->original_id);
+    return val;
 }
 
 static VALUE