osyoyu / pf2

A sampling-based profiler for Ruby
https://rubygems.org/gems/pf2
MIT License
48 stars 3 forks source link

Implement NewThreadWatcher #17

Closed osyoyu closed 8 months ago

osyoyu commented 8 months ago

This is kind of a re-do of https://github.com/osyoyu/pf2/pull/13.

This patch extracts the new-Thread watching feature out of signal_scheduler::TimerInstaller to its own struct, NewThreadWatcher. A bit of a cleanup.

Specifying threads: :all (or omitting threads) will now activate this feature. track_all_threads is removed (breaking change).