Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-120144: Refactor bdb monitoring backend to match settrace behavior#132484

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

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantiangaogaotiantian commentedApr 13, 2025
edited by bedevere-appbot
Loading

The existing behavior of bdb's monitoring backend does not fully match whatsys.settrace does. The update foropcode events is separated from the other local events, which does not quite make sense.

This PR unifies the event handling -update_local_events() will simply checkf_trace andf_trace_opcode to decide what events should be enabled for that code object.

This actually cleans up the logic for the monitoring backend.

Thecheck_trace_opcodes() is removed fromstop_trace() becauseclear_id does the work.

There was a small bug in the original code -check_trace_opcodes will actually erase the workcheck_trace_func does. It did not matter because we always dostart_trace() when we start trace and we are only interested in opcode events. However, theoretically it's still wrong. Now it has the correct behavior.

This is not really "user observable", so it should be considered as a refactoring. (However it blocks something I'm working on for async stuff).

@gaogaotiantian
Copy link
MemberAuthor

Hi@iritkatriel , this PR basically just make it clearer how the monitoring backend behavior matches the settrace bahavior, while fixing a small bug. Hope it won't be too much work to review :)

@gaogaotiantian
Copy link
MemberAuthor

Wow that was fast! Thanks!

@gaogaotiantiangaogaotiantian merged commit084d6dc intopython:mainApr 13, 2025
46 checks passed
@gaogaotiantiangaogaotiantian deleted the fix-bdb-opcode-trace branchApril 13, 2025 21:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@gaogaotiantian@iritkatriel

[8]ページ先頭

©2009-2025 Movatter.jp