3 * Copyright (C) 2008, 2010, 2011 by Larry Wall and others
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
8 * Provides macros that wrap the various DTrace probes we use. We add
9 * an extra level of wrapping to encapsulate the _ENABLED tests.
12 #if defined(USE_DTRACE) && defined(PERL_CORE)
14 # include "perldtrace.h"
16 # define PERL_DTRACE_PROBE_ENTRY(cv) \
17 if (PERL_SUB_ENTRY_ENABLED()) \
18 Perl_dtrace_probe_call(aTHX_ cv, TRUE);
20 # define PERL_DTRACE_PROBE_RETURN(cv) \
21 if (PERL_SUB_ENTRY_ENABLED()) \
22 Perl_dtrace_probe_call(aTHX_ cv, FALSE);
24 # define PERL_DTRACE_PROBE_FILE_LOADING(name) \
25 if (PERL_SUB_ENTRY_ENABLED()) \
26 Perl_dtrace_probe_load(aTHX_ name, TRUE);
28 # define PERL_DTRACE_PROBE_FILE_LOADED(name) \
29 if (PERL_SUB_ENTRY_ENABLED()) \
30 Perl_dtrace_probe_load(aTHX_ name, FALSE);
32 # define PERL_DTRACE_PROBE_OP(op) \
33 if (PERL_OP_ENTRY_ENABLED()) \
34 Perl_dtrace_probe_op(aTHX_ op);
36 # define PERL_DTRACE_PROBE_PHASE(phase) \
37 if (PERL_OP_ENTRY_ENABLED()) \
38 Perl_dtrace_probe_phase(aTHX_ phase);
43 # define PERL_DTRACE_PROBE_ENTRY(cv)
44 # define PERL_DTRACE_PROBE_RETURN(cv)
45 # define PERL_DTRACE_PROBE_FILE_LOADING(cv)
46 # define PERL_DTRACE_PROBE_FILE_LOADED(cv)
47 # define PERL_DTRACE_PROBE_OP(op)
48 # define PERL_DTRACE_PROBE_PHASE(phase)
53 * ex: set ts=8 sts=4 sw=4 et: