- Notifications
You must be signed in to change notification settings - Fork 31.7k
/
Copy pathpydtrace.h
59 lines (47 loc) · 2.35 KB
/
pydtrace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* Static DTrace probes interface */
#ifndefPy_DTRACE_H
#definePy_DTRACE_H
#ifdef__cplusplus
extern"C" {
#endif
#ifdefWITH_DTRACE
#include"pydtrace_probes.h"
/* pydtrace_probes.h, on systems with DTrace, is auto-generated to include
`PyDTrace_{PROBE}` and `PyDTrace_{PROBE}_ENABLED()` macros for every probe
defined in pydtrace.d.
Calling these functions must be guarded by a `PyDTrace_{PROBE}_ENABLED()`
check to minimize performance impact when probing is off. For example:
if (PyDTrace_FUNCTION_ENTRY_ENABLED())
PyDTrace_FUNCTION_ENTRY(f);
*/
#else
/* Without DTrace, compile to nothing. */
staticinlinevoidPyDTrace_LINE(constchar*arg0, constchar*arg1, intarg2) {}
staticinlinevoidPyDTrace_FUNCTION_ENTRY(constchar*arg0, constchar*arg1, intarg2) {}
staticinlinevoidPyDTrace_FUNCTION_RETURN(constchar*arg0, constchar*arg1, intarg2) {}
staticinlinevoidPyDTrace_GC_START(intarg0) {}
staticinlinevoidPyDTrace_GC_DONE(Py_ssize_targ0) {}
staticinlinevoidPyDTrace_INSTANCE_NEW_START(intarg0) {}
staticinlinevoidPyDTrace_INSTANCE_NEW_DONE(intarg0) {}
staticinlinevoidPyDTrace_INSTANCE_DELETE_START(intarg0) {}
staticinlinevoidPyDTrace_INSTANCE_DELETE_DONE(intarg0) {}
staticinlinevoidPyDTrace_IMPORT_FIND_LOAD_START(constchar*arg0) {}
staticinlinevoidPyDTrace_IMPORT_FIND_LOAD_DONE(constchar*arg0, intarg1) {}
staticinlinevoidPyDTrace_AUDIT(constchar*arg0, void*arg1) {}
staticinlineintPyDTrace_LINE_ENABLED(void) { return0; }
staticinlineintPyDTrace_FUNCTION_ENTRY_ENABLED(void) { return0; }
staticinlineintPyDTrace_FUNCTION_RETURN_ENABLED(void) { return0; }
staticinlineintPyDTrace_GC_START_ENABLED(void) { return0; }
staticinlineintPyDTrace_GC_DONE_ENABLED(void) { return0; }
staticinlineintPyDTrace_INSTANCE_NEW_START_ENABLED(void) { return0; }
staticinlineintPyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return0; }
staticinlineintPyDTrace_INSTANCE_DELETE_START_ENABLED(void) { return0; }
staticinlineintPyDTrace_INSTANCE_DELETE_DONE_ENABLED(void) { return0; }
staticinlineintPyDTrace_IMPORT_FIND_LOAD_START_ENABLED(void) { return0; }
staticinlineintPyDTrace_IMPORT_FIND_LOAD_DONE_ENABLED(void) { return0; }
staticinlineintPyDTrace_AUDIT_ENABLED(void) { return0; }
#endif/* !WITH_DTRACE */
#ifdef__cplusplus
}
#endif
#endif/* !Py_DTRACE_H */