This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In embed.pl, remove unused parameter $keep_pre from readvars().
[perl5.git] / mydtrace.h
1 /*    mydtrace.h
2  *
3  *    Copyright (C) 2008, by Larry Wall and others
4  *
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.
7  *
8  *      Provides macros that wrap the various DTrace probes we use. We add
9  *      an extra level of wrapping to encapsulate the _ENABLED tests.
10  */
11
12 #if defined(USE_DTRACE) && defined(PERL_CORE)
13
14 #  include "perldtrace.h"
15
16 #  define ENTRY_PROBE(func, file, line, stash)          \
17     if (PERL_SUB_ENTRY_ENABLED()) {                     \
18         PERL_SUB_ENTRY(func, file, line, stash);        \
19     }
20
21 #  define RETURN_PROBE(func, file, line, stash)         \
22     if (PERL_SUB_RETURN_ENABLED()) {                    \
23         PERL_SUB_RETURN(func, file, line, stash);       \
24     }
25
26 #  define PHASE_CHANGE_PROBE(new_phase, old_phase)      \
27     if (PERL_PHASE_CHANGE_ENABLED()) {                  \
28         PERL_PHASE_CHANGE(new_phase, old_phase);        \
29     }
30
31 #else
32
33 /* NOPs */
34 #  define ENTRY_PROBE(func, file, line, stash)
35 #  define RETURN_PROBE(func, file, line, stash)
36 #  define PHASE_CHANGE_PROBE(new_phase, old_phase)
37
38 #endif
39
40 /*
41  * Local variables:
42  * c-indentation-style: bsd
43  * c-basic-offset: 4
44  * indent-tabs-mode: t
45  * End:
46  *
47  * ex: set ts=8 sts=4 sw=4 noet:
48  */