Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:50

0001 /* Static DTrace probes interface */
0002 
0003 #ifndef Py_DTRACE_H
0004 #define Py_DTRACE_H
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008 
0009 #ifdef WITH_DTRACE
0010 
0011 #include "pydtrace_probes.h"
0012 
0013 /* pydtrace_probes.h, on systems with DTrace, is auto-generated to include
0014    `PyDTrace_{PROBE}` and `PyDTrace_{PROBE}_ENABLED()` macros for every probe
0015    defined in pydtrace.d.
0016 
0017    Calling these functions must be guarded by a `PyDTrace_{PROBE}_ENABLED()`
0018    check to minimize performance impact when probing is off. For example:
0019 
0020        if (PyDTrace_FUNCTION_ENTRY_ENABLED())
0021            PyDTrace_FUNCTION_ENTRY(f);
0022 */
0023 
0024 #else
0025 
0026 /* Without DTrace, compile to nothing. */
0027 
0028 static inline void PyDTrace_LINE(const char *arg0, const char *arg1, int arg2) {}
0029 static inline void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2)  {}
0030 static inline void PyDTrace_FUNCTION_RETURN(const char *arg0, const char *arg1, int arg2) {}
0031 static inline void PyDTrace_GC_START(int arg0) {}
0032 static inline void PyDTrace_GC_DONE(Py_ssize_t arg0) {}
0033 static inline void PyDTrace_INSTANCE_NEW_START(int arg0) {}
0034 static inline void PyDTrace_INSTANCE_NEW_DONE(int arg0) {}
0035 static inline void PyDTrace_INSTANCE_DELETE_START(int arg0) {}
0036 static inline void PyDTrace_INSTANCE_DELETE_DONE(int arg0) {}
0037 static inline void PyDTrace_IMPORT_FIND_LOAD_START(const char *arg0) {}
0038 static inline void PyDTrace_IMPORT_FIND_LOAD_DONE(const char *arg0, int arg1) {}
0039 static inline void PyDTrace_AUDIT(const char *arg0, void *arg1) {}
0040 
0041 static inline int PyDTrace_LINE_ENABLED(void) { return 0; }
0042 static inline int PyDTrace_FUNCTION_ENTRY_ENABLED(void) { return 0; }
0043 static inline int PyDTrace_FUNCTION_RETURN_ENABLED(void) { return 0; }
0044 static inline int PyDTrace_GC_START_ENABLED(void) { return 0; }
0045 static inline int PyDTrace_GC_DONE_ENABLED(void) { return 0; }
0046 static inline int PyDTrace_INSTANCE_NEW_START_ENABLED(void) { return 0; }
0047 static inline int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return 0; }
0048 static inline int PyDTrace_INSTANCE_DELETE_START_ENABLED(void) { return 0; }
0049 static inline int PyDTrace_INSTANCE_DELETE_DONE_ENABLED(void) { return 0; }
0050 static inline int PyDTrace_IMPORT_FIND_LOAD_START_ENABLED(void) { return 0; }
0051 static inline int PyDTrace_IMPORT_FIND_LOAD_DONE_ENABLED(void) { return 0; }
0052 static inline int PyDTrace_AUDIT_ENABLED(void) { return 0; }
0053 
0054 #endif /* !WITH_DTRACE */
0055 
0056 #ifdef __cplusplus
0057 }
0058 #endif
0059 #endif /* !Py_DTRACE_H */