Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-31618: Move opcode tracing to occur after the possible update to f_lineno. #3798

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 1 commit into from
Oct 19, 2017

Conversation

gwk
Copy link
Contributor

@gwk gwk commented Sep 28, 2017

This patch moves the new opcode tracing added in commit 5a85167 to happen after frame->f_lineno is updated. With this patch, when both f_trace_lines and f_trace_opcodes are enabled the trace function will see the same line number for both the 'line' and 'opcode' events.

A side effect of this patch is that the order of event emission has been switched; 'line' now happens before 'opcode'. Maintaining the current order would require more elaborate logic.

https://bugs.python.org/issue31618

@gwk gwk changed the title Move opcode tracing to occur after the possible update to f_lineno. bpo-31618: Move opcode tracing to occur after the possible update to f_lineno. Sep 28, 2017
@gwk
Copy link
Contributor Author

gwk commented Oct 18, 2017

@ncoghlan any thoughts on this? I'd really like to begin using the feature on master. Thanks!

@ncoghlan ncoghlan merged commit 20faa68 into python:master Oct 19, 2017
@ncoghlan
Copy link
Contributor

Ugh, and having added the "Skip News" label, I just realised that isn't right - this should have its own news entry, because the feature already shipped in the first two alpha releases.

@gwk Would you mind preparing a PR with a suitable NEWS snippet based on what you wrote in the opening PR comment?

@ncoghlan
Copy link
Contributor

Thanks for the fix though, and sorry for neglecting the PR for so long :)

@gwk gwk deleted the opcode-trace-after-line-update branch October 19, 2017 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants