summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_monitoring.py
Commit message (Collapse)AuthorAgeFilesLines
* GH-109369: Exit tier 2 if executor is invalid (GH-111657)Mark Shannon2023-11-091-0/+25
|
* GH-111485: Increment `next_instr` consistently at the start of the ↵Mark Shannon2023-10-311-8/+10
| | | | instruction. (GH-111486)
* gh-106193: Rename and fix duplicated tests in `test_monitoring` (GH-109139)Hugo van Kemenade2023-10-121-7/+7
|
* gh-109371: Fix monitoring with instruction events set (gh-109385)Tian Gao2023-09-181-0/+16
|
* gh-109156: Add tests for de-instrumenting instructions with instrumented ↵Tian Gao2023-09-131-0/+17
| | | | lines (GH-109157)
* gh-109357: Fix test_monitoring.test_gh108976() (#109358)Victor Stinner2023-09-131-0/+1
| | | | | | The test now calls free_tool_id() so it can be run multiple times in the same process. For example, the following command no longer fails: python -m test test_monitoring -R 3:3
* gh-109039: Branch prediction for Tier 2 interpreter (#109038)Guido van Rossum2023-09-111-8/+8
| | | | | | | | | | | This adds a 16-bit inline cache entry to the conditional branch instructions POP_JUMP_IF_{FALSE,TRUE,NONE,NOT_NONE} and their instrumented variants, which is used to keep track of the branch direction. Each time we encounter these instructions we shift the cache entry left by one and set the bottom bit to whether we jumped. Then when it's time to translate such a branch to Tier 2 uops, we use the bit count from the cache entry to decided whether to continue translating the "didn't jump" branch or the "jumped" branch. The counter is initialized to a pattern of alternating ones and zeros to avoid bias. The .pyc file magic number is updated. There's a new test, some fixes for existing tests, and a few miscellaneous cleanups.
* GH-108976. Keep monitoring data structures valid during de-optimization ↵Mark Shannon2023-09-111-0/+8
| | | | during callback. (GH-109131)
* gh-107265: Remove all ENTER_EXECUTOR when execute _Py_Instrument (gh-108539)Dong-hee Na2023-09-071-0/+28
|
* GH-108390: Prevent non-local events being set with ↵Mark Shannon2023-09-051-5/+25
| | | | `sys.monitoring.set_local_events()` (GH-108420)
* GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725)Mark Shannon2023-08-091-0/+32
|
* GH-106898: Add the exception as an argument to the `PY_UNWIND` event ↵Mark Shannon2023-07-271-3/+3
| | | | callback function. (GH-107347)
* GH-106895: Raise a `ValueError` when attempting to disable events that ↵Mark Shannon2023-07-271-1/+51
| | | | cannot be disabled. (GH-107337)
* GH-106897: Add `RERAISE` event to `sys.monitoring`. (GH-107291)Mark Shannon2023-07-271-37/+193
| | | * Ensures that exception handling events are balanced. Each [re]raise event has a matching unwind/handled event.
* GH-105229: Replace some superinstructions with single instruction ↵Mark Shannon2023-06-051-4/+4
| | | | equivalent. (GH-105230)
* GH-105162: Account for `INSTRUMENTED_RESUME` in gen.close/throw. (GH-105187)Mark Shannon2023-06-021-0/+35
|
* gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866)Carl Meyer2023-05-161-3/+220
|
* GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵Mark Shannon2023-05-121-2/+61
| | | | | | | | (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.
* gh-103845: Remove line & instruction instrumentations before adding them ↵Tian Gao2023-05-031-0/+36
| | | | back (GH-103851)
* GH-103082: Turn on branch events for FOR_ITER instructions. (#103507)Mark Shannon2023-04-131-0/+71
| | | Turn on branch events for FOR_ITER instructions.
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-121-0/+1044
(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