Skip to content

gh-122029: Log call events in sys.setprofile when it's a method with c function #122072

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

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Jul 21, 2024

Currently sys.setprofile logs the c_return event, but not c_call event, when the function is a PyMethodObject that points to a PyCFunction. This patch fixed that.

@gpshead gpshead added the type-bug An unexpected behavior, bug, or error label Jul 23, 2024
@gpshead gpshead merged commit e91ef13 into python:main Jul 23, 2024
39 checks passed
@miss-islington-app
Copy link

Thanks @gaogaotiantian for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2024
… with c function (pythonGH-122072)

Log call events in sys.setprofile when it is a method with a C function.
(cherry picked from commit e91ef13)

Co-authored-by: Tian Gao <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2024
… with c function (pythonGH-122072)

Log call events in sys.setprofile when it is a method with a C function.
(cherry picked from commit e91ef13)

Co-authored-by: Tian Gao <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 23, 2024

GH-122205 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 23, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jul 23, 2024

GH-122206 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jul 23, 2024
gpshead pushed a commit that referenced this pull request Jul 23, 2024
…d with c function (GH-122072) (GH-122206)

gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072)

Log call events in sys.setprofile when it is a method with a C function.
(cherry picked from commit e91ef13)

Co-authored-by: Tian Gao <[email protected]>
@gaogaotiantian gaogaotiantian deleted the setprofile-method branch July 23, 2024 22:48
gpshead pushed a commit that referenced this pull request Jul 23, 2024
…d with c function (GH-122072) (GH-122205)

gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072)

Log call events in sys.setprofile when it is a method with a C function.
(cherry picked from commit e91ef13)

Co-authored-by: Tian Gao <[email protected]>
nohlson pushed a commit to nohlson/cpython that referenced this pull request Jul 24, 2024
… with c function (pythonGH-122072)

Log call events in sys.setprofile when it is a method with a C function.
nohlson pushed a commit to nohlson/cpython that referenced this pull request Jul 24, 2024
… with c function (pythonGH-122072)

Log call events in sys.setprofile when it is a method with a C function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants