Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement and document PEP 669. #103082

Open
4 tasks
markshannon opened this issue Mar 28, 2023 · 4 comments
Open
4 tasks

Implement and document PEP 669. #103082

markshannon opened this issue Mar 28, 2023 · 4 comments
Labels
3.12 new features, bugs and security fixes type-feature A feature request or enhancement

Comments

@markshannon
Copy link
Member

markshannon commented Mar 28, 2023

Now that PEP 669 is accepted, it needs to be implemented and documented.

  • Implement the PEP
  • Decide on and implement policy for monitors seeing the code in other monitors.
  • Document the PEP
  • Use "macro" instructions to reduce code duplication in bytecodes.c

Linked PRs

@markshannon
Copy link
Member Author

Also needs to be added to the "What's new" and the PEP needs to be marked as accepted/final.

@AlexWaygood AlexWaygood added the 3.12 new features, bugs and security fixes label Mar 31, 2023
@markshannon markshannon changed the title Implement PEP 669. Implement and document PEP 669. Apr 5, 2023
@markshannon
Copy link
Member Author

Specific things to document (that aren't clear from the PEP) (from comments by @gvanrossum):

event_set is a "set" constructed by OR-ing various events together (a common C idiom of course but not apparent until you see their integer values).

From GVR: "The naming of the CALL and RETURN/RAISE events is a bit confusing -- we have CALL (universal), C_RETURN/PY_RETURN (per language), but then C_RAISE and RAISE -- why isn't the latter PY_RAISE, just for consistency?"

There are good reasons for this design, so they should be documented.

markshannon added a commit that referenced this issue Apr 12, 2023
…on (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
markshannon added a commit that referenced this issue Apr 13, 2023
Turn on branch events for FOR_ITER instructions.
carljm added a commit to carljm/cpython that referenced this issue Apr 13, 2023
* main:
  pythongh-103479: [Enum] require __new__ to be considered a data type (pythonGH-103495)
  pythongh-103365: [Enum] STRICT boundary corrections (pythonGH-103494)
  pythonGH-103488: Use return-offset, not yield-offset. (pythonGH-103502)
  pythongh-103088: Fix test_venv error message to avoid bytes/str warning (pythonGH-103500)
  pythonGH-103082: Turn on branch events for FOR_ITER instructions. (python#103507)
  pythongh-102978: Fix mock.patch function signatures for class and staticmethod decorators (python#103228)
  pythongh-103462: Ensure SelectorSocketTransport.writelines registers a writer when data is still pending (python#103463)
  pythongh-95299: Rework test_cppext.py to not invoke setup.py directly (python#103316)
aisk pushed a commit to aisk/cpython that referenced this issue Apr 18, 2023
… CPython (pythonGH-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
@pablogsal
Copy link
Member

pablogsal commented Apr 18, 2023

Seems that this PR (#103083) has broken the tracerefs buildbot:

https://buildbot.python.org/all/#/builders/484/builds/3091

@pablogsal
Copy link
Member

See also #103083 (comment)

markshannon pushed a commit that referenced this issue Apr 21, 2023
…H-103561)

Fix shifted field initialization in instrumentation.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 new features, bugs and security fixes type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants