Skip to content

Register internal OBJSPACE tracepoints globally#15396

Merged
jhawthorn merged 3 commits intoruby:masterfrom
jhawthorn:internal_tracepoint_global
Dec 9, 2025
Merged

Register internal OBJSPACE tracepoints globally#15396
jhawthorn merged 3 commits intoruby:masterfrom
jhawthorn:internal_tracepoint_global

Conversation

@jhawthorn
Copy link
Copy Markdown
Member

@jhawthorn jhawthorn commented Dec 3, 2025

Internal tracepoints only make sense to run globally, and they already took completely different paths.

This also fixes an issue where we would clear trace event flags when a Ractor exited (https://bugs.ruby-lang.org/issues/19112) whether or not they were ever used by the Ractor. This PR doesn't completely solve the issue, but does mitigate it in most (but not all) cases. This should probably be combined with #7184, which fixes multiple Ractors subscribing to the same events.

@launchable-app

This comment has been minimized.

@jhawthorn jhawthorn force-pushed the internal_tracepoint_global branch from e3c967e to c3946a7 Compare December 5, 2025 20:57
@jhawthorn jhawthorn marked this pull request as ready for review December 5, 2025 21:01
This solution is not quite correct because it doesn't solve multiple
Ractors subscribing to the same event, but this will avoid unrelated
events clobbering the flags for other events.

This however will work corretly for subscribing to global ObjectSpace GC
events.
@jhawthorn jhawthorn force-pushed the internal_tracepoint_global branch from c3946a7 to 74dcadb Compare December 6, 2025 01:17
Internal tracepoints only make sense to run globally, and they already
took completely different paths.
@jhawthorn jhawthorn force-pushed the internal_tracepoint_global branch from 74dcadb to 534d7d4 Compare December 6, 2025 01:39
@jhawthorn jhawthorn changed the title Register internal tracepoints globally Register internal OBJSPACE tracepoints globally Dec 6, 2025
@jhawthorn jhawthorn merged commit de94f88 into ruby:master Dec 9, 2025
89 checks passed
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.

1 participant