mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -349,14 +349,14 @@ class CodeTest(unittest.TestCase):
|
|||
def foo():
|
||||
pass
|
||||
|
||||
# assert that opcode 238 is invalid
|
||||
self.assertEqual(opname[238], '<238>')
|
||||
# assert that opcode 229 is invalid
|
||||
self.assertEqual(opname[229], '<229>')
|
||||
|
||||
# change first opcode to 0xee (=238)
|
||||
# change first opcode to 0xeb (=229)
|
||||
foo.__code__ = foo.__code__.replace(
|
||||
co_code=b'\xee' + foo.__code__.co_code[1:])
|
||||
co_code=b'\xe5' + foo.__code__.co_code[1:])
|
||||
|
||||
msg = f"unknown opcode 238"
|
||||
msg = f"unknown opcode 229"
|
||||
with self.assertRaisesRegex(SystemError, msg):
|
||||
foo()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue