mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083)
* The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
This commit is contained in:
parent
dce2d38cb0
commit
411b169281
44 changed files with 6029 additions and 1625 deletions
|
@ -20,6 +20,8 @@ class OpcodeTests(unittest.TestCase):
|
|||
# All defined opcodes
|
||||
has_arg = dis.hasarg
|
||||
for name, code in filter(lambda item: item[0] not in dis.deoptmap, dis.opmap.items()):
|
||||
if code >= opcode.MIN_INSTRUMENTED_OPCODE:
|
||||
continue
|
||||
with self.subTest(opname=name):
|
||||
if code not in has_arg:
|
||||
stack_effect(code)
|
||||
|
@ -47,6 +49,8 @@ class OpcodeTests(unittest.TestCase):
|
|||
has_exc = dis.hasexc
|
||||
has_jump = dis.hasjabs + dis.hasjrel
|
||||
for name, code in filter(lambda item: item[0] not in dis.deoptmap, dis.opmap.items()):
|
||||
if code >= opcode.MIN_INSTRUMENTED_OPCODE:
|
||||
continue
|
||||
with self.subTest(opname=name):
|
||||
if code not in has_arg:
|
||||
common = stack_effect(code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue