ivoanjo / gvl-tracing

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

Feature: Show garbage collection in traces #1

Closed ivoanjo closed 2 years ago

ivoanjo commented 2 years ago

It would be really cool to also have events for Garbage Collection shown in the traces.

byroot commented 2 years ago

Indeed, you should be able to get it with RUBY_INTERNAL_EVENT_GC_ENTER and RUBY_INTERNAL_EVENT_GC_EXIT e.g. https://github.com/Shopify/gctime/blob/6fe564fca08d834d6f2931816df91e2a61862a16/ext/gctime/gctime.c