From 2f445b24d1fcccfa186e5ac8cd8f82a820c4369d Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Sat, 8 Dec 2012 10:40:26 +1100 Subject: [PATCH] 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. --- mydtrace.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) 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); \ -- 2.7.4