diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 01:02:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 01:02:29 +0000 |
commit | 9d64a542094efdbcf8fc8b192750d6b0343665c3 (patch) | |
tree | 79011dd5107df17b3f7e2c8533a5ed965906c139 /internal.h | |
parent | 1546ffed499aa40e905485b00293fbb530d7ebd1 (diff) |
internal.h: RUBY_DTRACE_HOOK
* internal.h (RUBY_DTRACE_HOOK): extract from
RUBY_DTRACE_CREATE_HOOK for other type hooks.
* gc.c (RUBY_DTRACE_GC_HOOK): ditto.
* parse.y (RUBY_DTRACE_PARSE_HOOK): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal.h b/internal.h index 163fb65041..d135035607 100644 --- a/internal.h +++ b/internal.h @@ -1341,12 +1341,14 @@ VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0) RUBY_SYMBOL_EXPORT_END #define RUBY_DTRACE_CREATE_HOOK(name, arg) \ + RUBY_DTRACE_HOOK(name##_CREATE, arg) +#define RUBY_DTRACE_HOOK(name, arg) \ do { \ - if (UNLIKELY(RUBY_DTRACE_##name##_CREATE_ENABLED())) { \ + if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \ int dtrace_line; \ const char *dtrace_file = rb_source_loc(&dtrace_line); \ if (!dtrace_file) dtrace_file = ""; \ - RUBY_DTRACE_##name##_CREATE(arg, dtrace_file, dtrace_line); \ + RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \ } \ } while (0) |