RE: [PATCH] compress 2.018
[p5sagit/p5-mst-13.2.git] / mydtrace.h
CommitLineData
5ac1e9b2 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) \
17 if (PERL_SUB_ENTRY_ENABLED()) { \
18 PERL_SUB_ENTRY(func, file, line); \
19 }
20
21# define RETURN_PROBE(func, file, line) \
22 if (PERL_SUB_RETURN_ENABLED()) { \
23 PERL_SUB_RETURN(func, file, line); \
24 }
25
26#else
27
28/* NOPs */
29# define ENTRY_PROBE(func, file, line)
30# define RETURN_PROBE(func, file, line)
31
32#endif
33
34/*
35 * Local variables:
36 * c-indentation-style: bsd
37 * c-basic-offset: 4
38 * indent-tabs-mode: t
39 * End:
40 *
41 * ex: set ts=8 sts=4 sw=4 noet:
42 */