diff options
| author | Mark Shannon <mark@hotpy.org> | 2023-04-12 11:04:55 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-12 11:04:55 (GMT) |
| commit | 411b1692811b2ecac59cb0df0f920861c7cf179a (patch) | |
| tree | 64f7234e9d35623565ff1bb7fbd2c4688e8d3774 /Lib/test/test_dis.py | |
| parent | dce2d38cb04b541bad477ccc1040a68fa70a9a69 (diff) | |
| download | cpython-411b1692811b2ecac59cb0df0f920861c7cf179a.zip cpython-411b1692811b2ecac59cb0df0f920861c7cf179a.tar.gz cpython-411b1692811b2ecac59cb0df0f920861c7cf179a.tar.bz2 | |
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
Diffstat (limited to 'Lib/test/test_dis.py')
| -rw-r--r-- | Lib/test/test_dis.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index 4a21447..0a60a97 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -479,8 +479,7 @@ dis_asyncwith = """\ YIELD_VALUE 2 RESUME 3 JUMP_BACKWARD_NO_INTERRUPT 5 (to 14) - >> SWAP 2 - POP_TOP + >> END_SEND POP_TOP %3d LOAD_CONST 1 (1) @@ -492,11 +491,11 @@ dis_asyncwith = """\ CALL 2 GET_AWAITABLE 2 LOAD_CONST 0 (None) - >> SEND 3 (to 62) + >> SEND 3 (to 60) YIELD_VALUE 2 RESUME 3 - JUMP_BACKWARD_NO_INTERRUPT 5 (to 52) - >> POP_TOP + JUMP_BACKWARD_NO_INTERRUPT 5 (to 50) + >> END_SEND POP_TOP %3d LOAD_CONST 2 (2) @@ -504,21 +503,20 @@ dis_asyncwith = """\ RETURN_CONST 0 (None) %3d >> CLEANUP_THROW - JUMP_BACKWARD 26 (to 24) + JUMP_BACKWARD 25 (to 24) >> CLEANUP_THROW - JUMP_BACKWARD 9 (to 62) + JUMP_BACKWARD 9 (to 60) >> PUSH_EXC_INFO WITH_EXCEPT_START GET_AWAITABLE 2 LOAD_CONST 0 (None) - >> SEND 4 (to 100) + >> SEND 4 (to 98) YIELD_VALUE 3 RESUME 3 - JUMP_BACKWARD_NO_INTERRUPT 5 (to 88) + JUMP_BACKWARD_NO_INTERRUPT 5 (to 86) >> CLEANUP_THROW - >> SWAP 2 - POP_TOP - POP_JUMP_IF_TRUE 1 (to 108) + >> END_SEND + POP_JUMP_IF_TRUE 1 (to 104) RERAISE 2 >> POP_TOP POP_EXCEPT @@ -878,9 +876,9 @@ class DisTests(DisTestBase): def test_widths(self): long_opcodes = set(['JUMP_BACKWARD_NO_INTERRUPT', - ]) + 'INSTRUMENTED_CALL_FUNCTION_EX']) for opcode, opname in enumerate(dis.opname): - if opname in long_opcodes: + if opname in long_opcodes or opname.startswith("INSTRUMENTED"): continue with self.subTest(opname=opname): width = dis._OPNAME_WIDTH |
