From: Narihiro Nakamura Date: 2011-09-09T16:06:06+09:00 Subject: [ruby-core:39417] [Ruby 1.9 - Bug #5292] Access to GC::Profiler Records Issue #5292 has been updated by Narihiro Nakamura. Charlie Savage wrote: > Thank you. > > Can this be part of 1.9.3 or is it too late? > > Charlie Sorry, it's too late, because 1.9.3 branch already in feature freeze. ---------------------------------------- Bug #5292: Access to GC::Profiler Records http://redmine.ruby-lang.org/issues/5292 Author: Charlie Savage Status: Closed Priority: Normal Assignee: Category: core Target version: 1.9.3 ruby -v: ruby 1.9.3dev (2011-09-02 revision 33163) [i386-mswin32_100] Could the method gc_profile_record_get be made part of the GC::Profiler class? It returns an array of hashes of various interesting GC measurements. I'd like ruby-prof to hook into it. Unfortunately, only textual output is currently supported via gc_profile_result. And parsing that output would be a pain. To do this: * 1 line patch to gcc.c: rb_define_singleton_method(rb_mProfiler, "records", gc_profile_record_get, 0); * Is is a safe change since the result is a newly created array of hashes each time. * Its useful for performance analysis tools (like ruby-prof) Would be great to have this in 1.9.3 if at all possible. Thanks - Charlie -- http://redmine.ruby-lang.org