Skip to content

Conversation

@tenderlove
Copy link
Collaborator

This commit adds an option for initially hiding anonymous threads in profile output. This is particularly useful for profiling RubyGems / Bundler because most threads that do real work have names associated with them. However, some routines like the popen family will spawn a watchdog thread, and these watchdog threads clutter the profile output.

Before this patch:

Screenshot 2026-01-04 at 2 52 55 PM

After this patch:

Screenshot 2026-01-04 at 2 54 31 PM

Watchdog threads are still available from the "tracks" dropdown (if you want to see them):

Screenshot 2026-01-04 at 2 55 19 PM

This commit adds an option for initially hiding anonymous threads in
profile output.  This is particularly useful for profiling RubyGems /
Bundler because most threads that do real work have names associated
with them.  However, some routines like the popen family will
[spawn a watchdog thread](https://github.com/ruby/ruby/blob/04e90fe200d736db0a32a794b8dc742fa0cb5441/lib/open3.rb#L535),
and these watchdog threads clutter the profile output.
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