143003dfeSmillert /* mydtrace.h 243003dfeSmillert * 3898184e3Ssthen * Copyright (C) 2008, 2010, 2011 by Larry Wall and others 443003dfeSmillert * 543003dfeSmillert * You may distribute under the terms of either the GNU General Public 643003dfeSmillert * License or the Artistic License, as specified in the README file. 743003dfeSmillert * 843003dfeSmillert * Provides macros that wrap the various DTrace probes we use. We add 943003dfeSmillert * an extra level of wrapping to encapsulate the _ENABLED tests. 1043003dfeSmillert */ 1143003dfeSmillert 1243003dfeSmillert #if defined(USE_DTRACE) && defined(PERL_CORE) 1343003dfeSmillert 1443003dfeSmillert # include "perldtrace.h" 1543003dfeSmillert 16*b8851fccSafresh1 # define PERL_DTRACE_PROBE_ENTRY(cv) \ 17*b8851fccSafresh1 if (PERL_SUB_ENTRY_ENABLED()) \ 18*b8851fccSafresh1 Perl_dtrace_probe_call(aTHX_ cv, TRUE); 19898184e3Ssthen 20*b8851fccSafresh1 # define PERL_DTRACE_PROBE_RETURN(cv) \ 21*b8851fccSafresh1 if (PERL_SUB_ENTRY_ENABLED()) \ 22*b8851fccSafresh1 Perl_dtrace_probe_call(aTHX_ cv, FALSE); 23898184e3Ssthen 24*b8851fccSafresh1 # define PERL_DTRACE_PROBE_FILE_LOADING(name) \ 25*b8851fccSafresh1 if (PERL_SUB_ENTRY_ENABLED()) \ 26*b8851fccSafresh1 Perl_dtrace_probe_load(aTHX_ name, TRUE); 2743003dfeSmillert 28*b8851fccSafresh1 # define PERL_DTRACE_PROBE_FILE_LOADED(name) \ 29*b8851fccSafresh1 if (PERL_SUB_ENTRY_ENABLED()) \ 30*b8851fccSafresh1 Perl_dtrace_probe_load(aTHX_ name, FALSE); 31898184e3Ssthen 32*b8851fccSafresh1 # define PERL_DTRACE_PROBE_OP(op) \ 33*b8851fccSafresh1 if (PERL_OP_ENTRY_ENABLED()) \ 34*b8851fccSafresh1 Perl_dtrace_probe_op(aTHX_ op); 3591f110e0Safresh1 36*b8851fccSafresh1 # define PERL_DTRACE_PROBE_PHASE(phase) \ 37*b8851fccSafresh1 if (PERL_OP_ENTRY_ENABLED()) \ 38*b8851fccSafresh1 Perl_dtrace_probe_phase(aTHX_ phase); 3943003dfeSmillert 4043003dfeSmillert #else 4143003dfeSmillert 4243003dfeSmillert /* NOPs */ 43*b8851fccSafresh1 # define PERL_DTRACE_PROBE_ENTRY(cv) 44*b8851fccSafresh1 # define PERL_DTRACE_PROBE_RETURN(cv) 45*b8851fccSafresh1 # define PERL_DTRACE_PROBE_FILE_LOADING(cv) 46*b8851fccSafresh1 # define PERL_DTRACE_PROBE_FILE_LOADED(cv) 47*b8851fccSafresh1 # define PERL_DTRACE_PROBE_OP(op) 48*b8851fccSafresh1 # define PERL_DTRACE_PROBE_PHASE(phase) 4943003dfeSmillert 5043003dfeSmillert #endif 5143003dfeSmillert 5243003dfeSmillert /* 5391f110e0Safresh1 * ex: set ts=8 sts=4 sw=4 et: 5443003dfeSmillert */ 55