ivoanjo / gvl-tracing

Get a timeline view of Global VM Lock usage in your Ruby app
MIT License
114 stars 7 forks source link

Use different names to convey thread status #3

Closed casperisfine closed 2 years ago

casperisfine commented 2 years ago

Fix: #2 As discussed on Twitter.

The RUBY_INTERNAL_THREAD_EVENT_* names convey state transition not status. Given that gvl-tracing generate areas with a state until the next event, it would be more clear to disaply thread status instead.

I think running is best to describe threads that have acquire the GVL and are actually executing.

For waiting is the best I could find to describe thread waiting for IO or join. But sleeping could do as well.

And finally I think ready works to describe threads that could be executed but are waiting on the GVL.

Either way the README should probably describe the signification of each status.

FYI @ko1

ivoanjo commented 2 years ago

(I left a comment on the macOS support PR, I was thinking I would put out a release after that one is merged as well)

casperisfine commented 2 years ago

I was thinking I would put out a release after that one is merged as well

Sure. But I was thinking I could take a stab at the GC events (#1) shouldn't be too hard., so might be worth waiting a few more hours.

ivoanjo commented 2 years ago

Oh, nice! Happy to wait then :)