Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
GC::Profiler.enable
() -> nil
GC::Profiler.enable → nil
gc/default/default.c
View on GitHub ↗
static VALUE
gc_profile_enable(VALUE _)
{
rb_objspace_t *objspace = rb_gc_get_objspace();
objspace->profile.run = TRUE;
objspace->profile.current_record = 0;
return Qnil;
}
Starts the GC profiler.