Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython#103083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
127 commits Select commitHold shift + click to select a range
e85d910
Initial experimental implementation of PEP 669.
markshannon6283ee8
First draft implementing small subset of PEP 669.
markshannon4edb7b7
Support disabling and restarting.
markshannon852c40b
Support multiple tools per event.
markshannon416b314
Tidy up of monitoring internals
markshannon7971979
Fix legacy tracing.
markshannon9896902
Implement support for multiple tools.
markshannonf432a66
Get support for line tracing mostly working. Needs to wait for regist…
markshannonfb29b34
Merge branch 'main' into pep-669-incremental
markshannon15a1ccd
Fix up INSTRUMENTED_OPCODES vector.
markshannon9abb339
Fix instrumented branches to call instrumentation with correct target.
markshannon3ba6a39
Merge main and assorted fixups to handle new instruction.
markshannonaa09895
Add PY_THROW event handling and fix up line table.
markshannon9e5d87d
LINE events working for sys.setrace.
markshannone52cbe6
Add lots of internal debugging for instrumentation.
markshannon6c8be7e
Add more tests. Get those and some other passing.
markshannonc9e1e21
Fix LINE instrumentation and frame.set_lineno support (mostly)
markshannone52e8d3
Refining line event generation.
markshannonf434ec7
Get sys.settrace tests passing.
markshannonb680084
Monitor 'internal' StopIteration raises.
markshannone6e7cf1
Check for NULLs.
markshannon5bbc83e
Fix up a few tests
markshannon7fe9a43
Turn off debugging output by default.
markshannon8b9f996
Remove debugging printfs
markshannon9b02640
Avoid refleak.
markshannon2cadf32
Record last traced line on frame object.
markshannon1f54d77
Get a couple more top-level tests passing.
markshannon43a3f3e
Update magic number
markshannon3d436cf
Remove debug print statement.
markshannon691bcf5
Raise SystemError if frame is missing.
markshannonf07be07
Restore a few tests and better handle EXTENDED_ARG.
markshannon8b8f67e
Make sure instrumentation respects instruction boundaries.
markshannond0a2228
Fix handling of errors in jump instruments
markshannon2a3a85e
Fix memory leaks.
markshannonc3724ab
Instrument FOR_ITER.
markshannond64823c
Fix legacy profiling of calls.
markshannon284d0b1
Fix up instrumented yield.
markshannonb9e1f3b
Merge branch 'main' into pep-669-incremental
markshannon1440473
Fix instrumentation of SEND and tidy up instrumented bytecode numbering.
markshannon825f42a
Handle line numbers in exception handled event.
markshannonce5ddb3
Instrument END_FOR to mimic PEP 380 StopIteration and add more tests.
markshannon5740c47
Merge branch 'main' into pep-669-incremental
markshannonda83abe
Add END_SEND for instrumentation.
markshannoncdb2bda
Correctly set StopIteration in INSTRUMENTED_END_FOR.
markshannon0148fa3
Set last traced line when jumping in debugger.
markshannonc5fb4f4
Fix test_dis to account for END_SEND.
markshannon7fa431b
Add a few more tests.
markshannon25bbc61
delete commented out code
markshannon5629a3e
Fix last (known) inconsistency in sys.settrace behaviour
markshannon477cc53
More clearly differentiate between instrumented events and non-instru…
markshannon23b5f5e
Add support for sys.monitoring.MISSING
markshannondfc18c5
Add support for local (per-code-object) event monitoring.
markshannon566adbe
Merge branch 'main' into pep-669
markshannoncfb17ed
Make sure that tracing/profiling thread counts are correct.
markshannonc535f76
Remove linearray field
markshannond579d2e
Rename some fields, shortening names.
markshannon0982e5e
Remove out of dat comments.
markshannon0693423
Remove instrumentation for JUMP_IF_[FALS|TRUE]_OR_POP
markshannond6453e5
Merge branch 'main' into pep-669
markshannon0ee2aee
Minor fixups from merge.
markshannonacdca93
Remove instrumentation for COMPARE_AND_BRANCH.
markshannonf17ef14
Merge branch 'main' into pep-669
markshannone7f6c37
Group instrumented opcodes.
markshannone44ebc5
Remove last references to DO_TRACING
markshannonece51e6
Merge branch 'main' into pep-669
markshannone88921e
Remove unused function.
markshannon2d9f22c
Streamline de-instrumentation a little.
markshannonb7579ac
Use modern API for saving and restoring exception.
markshannon5a089a6
Refactor instrumentation calls to reduce duplication.
markshannond5fdec8
Fix refleaks
markshannonc88741d
Remove commented out code.
markshannonb6744ca
Make sure that stacktop == -1 when stack_pointer is cached.
markshannon6c3473a
Minor cleanups.
markshannon899aecd
Remove useless asserts.
markshannon80d2e2e
Make functions static
markshannon94d35d8
Update Windows build files.
markshannon5aa0805
Make _PyLegacyEventHandler_Type immortal
markshannonb39edd3
Make arrays const.
markshannonc9c40cb
Rename _PyFrame_GetStackPointer to _PyFrame_FetchStackPointer and mak…
markshannon6611c72
Fixups from code review
markshannon50d28f1
Improve debugging output and make a few things more robust.
markshannon7165f52
Fix up frame.set_lineno().
markshannon65c548e
Make line instrumentation able to handle multiple inits.
markshannon575f7d1
Add brief comments on instrumentation data structures.
markshannon415741d
Add symbol constant for min instrumented opcode.
markshannond70a1a4
Code cleanup from review.
markshannond580de6
A bit more cleanup.
markshannon2076d5f
Add a few more comments.
markshannon7b32d79
Remove unused code.
markshannon662c16c
Fix leak of monitoring blocks.
markshannond0139e9
Merge branch 'main' into pep-669
markshannon51a93e7
Make function static.
markshannon64bf37f
Use symbolic constants in line computations.
markshannon5faec77
Make data static.
markshannon0be1562
Add extra check.
markshannonb32a075
Make sure that instrumentation of line and instructions at the same t…
markshannon85d6923
Remove incorrect assertion.
markshannonebcc42f
Turn off instrumentation debugging.
markshannon7cfbc7e
Fix a couple of errors.
markshannond366364
Add minimal news entry.
markshannonfdb4860
Pacify the global object checker.
markshannonaee722f
Minor fixups.
markshannonbba53b8
Fix refleak when error in RETURN instrumentation.
markshannon718fbc8
Merge branch 'main' into pep-669
markshannon97ec1c5
Fix another refleak in error handling in instrumented instruction.
markshannonedc6709
Remove debug code ready for final review.
markshannone40a68f
Fix another (and hopefully final) refleak when handling an error in a…
markshannond9f8192
Comment and rename #defines to better reflect names in PEP.
markshannon2d9a380
Add various IDs as defined in the PEP.
markshannon29f41e7
Remove _PyThreadState_UpdateTracingState.
markshannon38b7f43
Formatting fixes, and check error codes.
markshannon9a40dad
Make sure tool API function names match PEP.
markshannona551d65
A bit more cleanup.
markshannon4951306
Tidy up imports.
markshannon44a031e
Use clinic return converters.
markshannonc2155b7
Address code review.
markshannonb218428
Address further review comments.
markshannon9c0429e
Use byte offset, to conform to the convention used in other APIs taki…
markshannonc6bf38e
Address code review.
markshannon82fe16c
Merge branch 'main' into pep-669
markshannon43618a9
Keep check-c-globals happy.
markshannon821ae52
Don't crash if locals events aren't set.
markshannon505a08d
Add NO_EVENTS.
markshannonf63da91
Flip order of LINE and INSTRUCTION events.
markshannonc324344
Check tool is in use when setting events.
markshannon168b34a
Reset last traced line number when setting frame.f_trace only if set …
markshannonf07a080
Tidy up test case.
markshannonFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Reset last traced line number when setting frame.f_trace only if set …
…to new value.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit168b34ab6f94ccdcc88f0ab7fc6d2b6e0182b74c
There are no files selected for viewing
42 changes: 42 additions & 0 deletionsLib/test/test_sys_settrace.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.