Skip to content

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantiangaogaotiantian 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.

@gaogaotiantiangaogaotiantian changed the title gh-109156: Prevent de-instrumenting INSTRUCTION from de-instrumenting LINEgh-109156: Prevent de-instrumenting lines when de-instrumenting instructionsSep 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

@gaogaotiantiangaogaotiantianforce-pushed the monitoring-deinstrument-instruction branch from c9cce8a to e4276a4CompareSeptember 12, 2023 22:30
@gaogaotiantiangaogaotiantian changed the title gh-109156: Prevent de-instrumenting lines when de-instrumenting instructionsgh-109156: Add tests for de-instrumenting instructions with instrumented linesSep 12, 2023
@gaogaotiantian
Copy link
MemberAuthor

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

@markshannon
Copy link
Member

Thanks

@markshannonmarkshannon merged commit d69805b into python:mainSep 13, 2023
vstinner pushed a commit to vstinner/cpython that referenced this pull request Sep 13, 2023
@gaogaotiantiangaogaotiantian deleted the monitoring-deinstrument-instruction branch September 13, 2023 17:42
Sign up for freeto 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

@gaogaotiantian@markshannon@bedevere-bot