-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Add C hook in PyDict_SetItem for debuggers #49904
Comments
I'm interested in adding support for debugger watchpoint's in the core. This is a proof of concept patch; I wanted to see if it would work and If there's interest in this, I will clean this up and add watchpoints to |
The patch seems to contain unrelated changes to multiprocessing. |
Oops, the multiprocessing changes should not be in the patch |
This is a critical path in Python and it should be kept as clean as Strong -1 against this being in the default build. Also, I'm not convinced that the idea itself is even that useful. Why |
My hope is that the runtime performance cost will be negligible but if My experience with watchpoints in C debuggers (gdb) is they can be the I would be willing to try and generalize this and support more hooks if |
John, I'm adding a +0 to cancel out Raymond's -1. I've read your |
Can this be closed? |
I see no reason to close until benchmark results prove it decreases real-life performance. Looking at the patch, the cost in the normal case is a single pointer comparison with NULL, something very cheap. |
The Linux kernel patchs dynamically the code: disabling a probe writes NOP instruction in memory to avoid the cost of the test. Probes are completly disabled by default. See kernel markers (introduced in Linux 2.6.24) and the more recent kernel tracepoints (introduced in Linux 2.6.28).
I agree. |
I think it's besides the point of this patch to ifdef it out. If John wants a version of Python with this enabled, he can well enough build one without our permission. So it would be useful only if it was always available, and perhaps properly integrated into pdb. IOW, I'm +1 for the patch. Having actual benchmarks would demonstrating the (expected) outcome (i.e. no measurable effect) would still be required to advance this. |
No activity for 9 years, I close the issue. |
I wish this wasn't a closed issue. It's not like a PR was abandoned. The issue is still real and very much affects the professional adoption of python across enterprise environments globally. Watchpoints are a necessary feature in modern IDEs for debugging, and if I understand correctly this sort of hook is necessary to enable watchpoints in a performant way |
@chadfurman Not to worry, this is being done for 3.12. See #91052 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: