aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/ceval_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r--Python/ceval_macros.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h
index c88a07c1f5e..50941e4ec47 100644
--- a/Python/ceval_macros.h
+++ b/Python/ceval_macros.h
@@ -358,12 +358,16 @@ do { \
// for an exception handler, displaying the traceback, and so on
#define INSTRUMENTED_JUMP(src, dest, event) \
do { \
- _PyFrame_SetStackPointer(frame, stack_pointer); \
- next_instr = _Py_call_instrumentation_jump(tstate, event, frame, src, dest); \
- stack_pointer = _PyFrame_GetStackPointer(frame); \
- if (next_instr == NULL) { \
- next_instr = (dest)+1; \
- goto error; \
+ if (tstate->tracing) {\
+ next_instr = dest; \
+ } else { \
+ _PyFrame_SetStackPointer(frame, stack_pointer); \
+ next_instr = _Py_call_instrumentation_jump(tstate, event, frame, src, dest); \
+ stack_pointer = _PyFrame_GetStackPointer(frame); \
+ if (next_instr == NULL) { \
+ next_instr = (dest)+1; \
+ goto error; \
+ } \
} \
} while (0);