-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Make tracepoints with set_trace_func or TracePoint.new ractor local #7184
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
base: master
Are you sure you want to change the base?
Conversation
This broke some internal events tests, like GC events, so I'll take a look soon. |
Thanks for picking up this fix!
This would be great as well! I work on the profiler included in the This way, we won't have to do things like intercept Ractor creation to make sure we reactivate our tracepoints for every new one that gets created. Even if such an API is only available from C (I understand it may be harder to get Ruby-level tracepoints working cross-ractor), it would be incredibly valuable :) |
Before this change, GC'ing any Ractor object caused you to lose all enabled tracepoints across all ractors (even main). Now tracepoints are ractor-local and this doesn't happen. Internal events are still global. Fixes [Bug #19112]
ff26fcd
to
06ead01
Compare
Not a problem 😄 I think a |
When target is given it's ractor local tracepoint.
Just wanted to follow up to ask if there's any plans to finish this. This would help enable reliable memory allocation profiling in our infrastructure. |
This should be getting more attention soon. I plan on working on the 'debug' gem to enable breakpoints to work inside Ractors, and this PR would enable that work. |
Before this change, GC'ing any Ractor object caused you to lose all enabled tracepoints across all ractors (even main). Now tracepoints are ractor-local and this doesn't happen.
Fixes [Bug #19112]
NOTE: I have yet to change the docs for TracePoint to mention that they are ractor-local, but I'm going to do that
in a separate PR. Also, I want to make it so that there's a flag to TracePoint#enable to make them global.