From: Tony Cook Date: Fri, 7 Dec 2012 23:40:26 +0000 (+1100) Subject: fix dtrace (as emulated with systemtap) builds on linux X-Git-Tag: upstream/5.20.0~4583 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f445b24d1fcccfa186e5ac8cd8f82a820c4369d;p=platform%2Fupstream%2Fperl.git fix dtrace (as emulated with systemtap) builds on linux the stap branch of the #if was passing four arguments to OP_ENTRY_PROBE, much hilarity ensued. Since literal strings are never passed as the name parameter we can move OP_ENTRY_PROBE out of the conditional and avoid duplication. --- diff --git a/mydtrace.h b/mydtrace.h index 951d177..5093f46 100644 --- a/mydtrace.h +++ b/mydtrace.h @@ -32,12 +32,6 @@ PERL_SUB_RETURN(tmp_func, file, line, stash); \ } -# define OP_ENTRY_PROBE(name) \ - if (PERL_OP_ENTRY_ENABLED()) { \ - const char *tmp_name = name; \ - PERL_OP_ENTRY(tmp_name, file, line, stash); \ - } - # define LOADING_FILE_PROBE(name) \ if (PERL_LOADING_FILE_ENABLED()) { \ const char *tmp_name = name; \ @@ -62,11 +56,6 @@ PERL_SUB_RETURN(func, file, line, stash); \ } -# define OP_ENTRY_PROBE(name) \ - if (PERL_OP_ENTRY_ENABLED()) { \ - PERL_OP_ENTRY(name); \ - } - # define LOADING_FILE_PROBE(name) \ if (PERL_LOADING_FILE_ENABLED()) { \ PERL_LOADING_FILE(name); \ @@ -79,6 +68,11 @@ # endif +# define OP_ENTRY_PROBE(name) \ + if (PERL_OP_ENTRY_ENABLED()) { \ + PERL_OP_ENTRY(name); \ + } + # define PHASE_CHANGE_PROBE(new_phase, old_phase) \ if (PERL_PHASE_CHANGE_ENABLED()) { \ PERL_PHASE_CHANGE(new_phase, old_phase); \