Skip to content

Commit

Permalink
GH-128375: Better instrument for FOR_ITER (GH-128445)
Browse files Browse the repository at this point in the history
  • Loading branch information
markshannon authored Jan 6, 2025
1 parent b9c693d commit f826bec
Show file tree
Hide file tree
Showing 27 changed files with 827 additions and 544 deletions.
4 changes: 2 additions & 2 deletions Include/internal/pycore_instruments.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ _Py_call_instrumentation_instruction(

_Py_CODEUNIT *
_Py_call_instrumentation_jump(
PyThreadState *tstate, int event,
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, _Py_CODEUNIT *target);
_Py_CODEUNIT *instr, PyThreadState *tstate, int event,
_PyInterpreterFrame *frame, _Py_CODEUNIT *src, _Py_CODEUNIT *dest);

extern int
_Py_call_instrumentation_arg(PyThreadState *tstate, int event,
Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ Known values:
Python 3.14a2 3609 (Add LOAD_SMALL_INT and LOAD_CONST_IMMORTAL instructions, remove RETURN_CONST)
Python 3.14a4 3610 (Add VALUE_WITH_FAKE_GLOBALS format to annotationlib)
Python 3.14a4 3611 (Add NOT_TAKEN instruction)
Python 3.14a4 3612 (Add POP_ITER and INSTRUMENTED_POP_ITER)
Python 3.15 will start with 3650
Expand All @@ -276,7 +277,7 @@ PC/launcher.c must also be updated.
*/

#define PYC_MAGIC_NUMBER 3611
#define PYC_MAGIC_NUMBER 3612
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
39 changes: 31 additions & 8 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f826bec

Please sign in to comment.