GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-96636: Remove all uses of NOTRACE_DISPATCH by markshannon · Pull Request #96643 · python/cpython

Conversation

@markshannon

@markshannon markshannon commented Sep 7, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: NOTRACE_DISPATCH breaks tracing #96636

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
markshannon added 4 commits September 7, 2022 11:10
@markshannon
Remove potentially unsafe uses of NOTRACE_DISPATCH.
365b6cc
@markshannon
Add test to check that tracing is respected in specialized code. Than…
7785d40
…ks to Brandt Bucher for the test idea.
@markshannon
Add news.
85e5844
@markshannon
Turn tracing off again after check.
3dd9966
@bedevere-bot bedevere-bot added the awaiting core review label Sep 7, 2022
@markshannon
markshannon requested a review from brandtbucher September 7, 2022 11:06
@markshannon
Remove all remaining uses of NOTRACE_DISPATCH() as they might be unsafe.
5cfaab6
brandtbucher
brandtbucher approved these changes Sep 7, 2022
View reviewed changes

@brandtbucher brandtbucher left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick PR!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_dynamic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Core and Builtins/2022-09-07-12-02-11.gh-issue-96636.YvN-K6.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_dynamic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Sep 7, 2022
@mdboom

mdboom commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

Naive question: Do we expect this to have a performance impact, and should we measure it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brandtbucher

brandtbucher commented Sep 7, 2022

Copy link
Copy Markdown
Member

Mark and I both benchmarked similar changes independently this week. I saw a 0% slowdown, he saw a 1% slowdown. So the perf impact is likely <1%.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon and others added 3 commits September 7, 2022 16:38
@markshannon @brandtbucher
Update Lib/test/test_dynamic.py
5872b7a
Co-authored-by: Brandt Bucher <[email protected]>
@markshannon @brandtbucher
Update Misc/NEWS.d/next/Core and Builtins/2022-09-07-12-02-11.gh-issu…
7ff1782
…e-96636.YvN-K6.rst

Co-authored-by: Brandt Bucher <[email protected]>
@markshannon @brandtbucher
Update Lib/test/test_dynamic.py
ff834d6
Co-authored-by: Brandt Bucher <[email protected]>
@Fidget-Spinner Fidget-Spinner changed the title GH-96636: Remove unsafe uses of NOTRACE_DISPATCH GH-96636: Remove all uses of NOTRACE_DISPATCH Sep 7, 2022
Fidget-Spinner
Fidget-Spinner approved these changes Sep 7, 2022
View reviewed changes

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The fix looks fine. Just one question about the tests.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_dynamic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum
gvanrossum reviewed Sep 7, 2022
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just nits.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_dynamic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_dynamic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_dynamic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/ceval.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

sweeneyde
sweeneyde reviewed Sep 7, 2022
View reviewed changes
Comment thread Python/ceval.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

markshannon added 2 commits September 8, 2022 11:05
@markshannon
Fixup spacing
72540d4
@markshannon
Make sure that we don't double-trace instructions with extended args.
011edc7
gvanrossum
gvanrossum approved these changes Sep 8, 2022
View reviewed changes
@markshannon markshannon added the needs backport to 3.11 only security fixes label Sep 8, 2022
@markshannon
markshannon merged commit aa3b4cf into python:main Sep 8, 2022
@miss-islington

miss-islington commented Sep 8, 2022

Copy link
Copy Markdown
Contributor

Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Sep 8, 2022
@miss-islington

miss-islington commented Sep 8, 2022

Copy link
Copy Markdown
Contributor

Sorry, @markshannon, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker aa3b4cf779b3dddb84e094879b91703354910d8c 3.11

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington miss-islington assigned markshannon Sep 8, 2022
@markshannon
markshannon deleted the remove-unsafe-notrace-dispatch branch September 8, 2022 16:22
markshannon added a commit to faster-cpython/cpython that referenced this pull request Sep 8, 2022
@markshannon @brandtbucher
pythonGH-96636: Remove all uses of NOTRACE_DISPATCH (pythonGH-96643)
c3e987b
Co-authored-by: Brandt Bucher <[email protected]>
(cherry picked from commit aa3b4cf)
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 8, 2022
@bedevere-bot

bedevere-bot commented Sep 8, 2022

Copy link
Copy Markdown

GH-96688 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum pushed a commit that referenced this pull request Sep 9, 2022
@markshannon @brandtbucher
[3.11] GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643) (#96688)
5586da6
Co-authored-by: Brandt Bucher <[email protected]>
(cherry picked from commit aa3b4cf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@sweeneyde sweeneyde sweeneyde left review comments
@gvanrossum gvanrossum gvanrossum approved these changes
@brandtbucher brandtbucher brandtbucher approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@markshannon markshannon

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@markshannon @mdboom @brandtbucher @miss-islington @bedevere-bot @gvanrossum @Fidget-Spinner @sweeneyde
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.