mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
GH-103082: Filter LINE events in VM, to simplify tool implementation. (GH-104387)
When monitoring LINE events, instrument all instructions that can have a predecessor on a different line. Then check that the a new line has been hit in the instrumentation code. This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
This commit is contained in:
parent
19ee53d52e
commit
45f5aa8fc7
16 changed files with 255 additions and 161 deletions
|
@ -334,11 +334,10 @@ do { \
|
|||
#define INSTRUMENTED_JUMP(src, dest, event) \
|
||||
do { \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer); \
|
||||
int err = _Py_call_instrumentation_jump(tstate, event, frame, src, dest); \
|
||||
next_instr = _Py_call_instrumentation_jump(tstate, event, frame, src, dest); \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame); \
|
||||
if (err) { \
|
||||
if (next_instr == NULL) { \
|
||||
next_instr = (dest)+1; \
|
||||
goto error; \
|
||||
} \
|
||||
next_instr = frame->prev_instr; \
|
||||
} while (0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue