mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -69,13 +69,13 @@ _Py_call_instrumentation(PyThreadState *tstate, int event,
|
|||
|
||||
extern int
|
||||
_Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame,
|
||||
_Py_CODEUNIT *instr);
|
||||
_Py_CODEUNIT *instr, _Py_CODEUNIT *prev);
|
||||
|
||||
extern int
|
||||
_Py_call_instrumentation_instruction(
|
||||
PyThreadState *tstate, _PyInterpreterFrame* frame, _Py_CODEUNIT *instr);
|
||||
|
||||
int
|
||||
_Py_CODEUNIT *
|
||||
_Py_call_instrumentation_jump(
|
||||
PyThreadState *tstate, int event,
|
||||
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, _Py_CODEUNIT *target);
|
||||
|
@ -100,6 +100,7 @@ extern int
|
|||
_Py_Instrumentation_GetLine(PyCodeObject *code, int index);
|
||||
|
||||
extern PyObject _PyInstrumentation_MISSING;
|
||||
extern PyObject _PyInstrumentation_DISABLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue