Skip to content

gh-109156: Add tests for de-instrumenting instructions with instrumented lines #109157

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

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Sep 8, 2023

Treat INSTRUMENTED_LINE specially in de_instrument_per_instruction. We should keep INSTRUMENTED_LINE.

There are some common code, but they are in the middle of the process. So to make it clear, I just basically separated two cases. I did not put as many checks in INSTRUMENTED_LINE case as the original code. I can do that if that's desired.

@gaogaotiantian gaogaotiantian changed the title gh-109156: Prevent de-instrumenting INSTRUCTION from de-instrumenting LINE gh-109156: Prevent de-instrumenting lines when de-instrumenting instructions Sep 8, 2023
@markshannon
Copy link
Member

I believe #109131 also fixes this, but will double check once that PR is merged.

The fix is here: https://github.com/python/cpython/pull/109131/files#diff-adaefb7da847260ef7aff6e66007bc83f5b226c5389a23e1c9ea622c3b02c419R636

@gaogaotiantian gaogaotiantian force-pushed the monitoring-deinstrument-instruction branch from c9cce8a to e4276a4 Compare September 12, 2023 22:30
@gaogaotiantian gaogaotiantian changed the title gh-109156: Prevent de-instrumenting lines when de-instrumenting instructions gh-109156: Add tests for de-instrumenting instructions with instrumented lines Sep 12, 2023
@gaogaotiantian
Copy link
Member Author

Okay @markshannon only the test was left in the PR and it passes with main.

@markshannon
Copy link
Member

Thanks

@markshannon markshannon merged commit d69805b into python:main Sep 13, 2023
vstinner pushed a commit to vstinner/cpython that referenced this pull request Sep 13, 2023
@gaogaotiantian gaogaotiantian deleted the monitoring-deinstrument-instruction branch September 13, 2023 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants