summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--probes_helper.h2
-rw-r--r--vm.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/probes_helper.h b/probes_helper.h
index 91514b3..12a18dc 100644
--- a/probes_helper.h
+++ b/probes_helper.h
@@ -7,6 +7,7 @@
VALUE rb_class_path_no_cache(VALUE _klass);
#define RUBY_DTRACE_HOOK(name, th, klazz, id) \
+do { \
if (RUBY_DTRACE_##name##_ENABLED()) { \
VALUE _klass = (klazz); \
VALUE _id = (id); \
@@ -49,6 +50,7 @@ VALUE rb_class_path_no_cache(VALUE _klass);
} \
} \
} \
+} while (0)
#define RUBY_DTRACE_METHOD_ENTRY_HOOK(th, klass, id) \
RUBY_DTRACE_HOOK(METHOD_ENTRY, th, klass, id)
diff --git a/vm.c b/vm.c
index 52f34c3..118dd13 100644
--- a/vm.c
+++ b/vm.c
@@ -1359,7 +1359,7 @@ vm_exec(rb_thread_t *th)
switch (VM_FRAME_TYPE(th->cfp)) {
case VM_FRAME_MAGIC_METHOD:
- RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0)
+ RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0, Qnil);
break;
case VM_FRAME_MAGIC_BLOCK: