Access to GC::Profiler Records
|ruby -v:||ruby 1.9.3dev (2011-09-02 revision 33163) [i386-mswin32_100]||Backport:|
Could the method gcprofilerecord_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 gcprofileresult. And parsing that output would be a pain.
To do this:
- 1 line patch to gcc.c:
rbdefinesingletonmethod(rbmProfiler, "records", gcprofilerecord_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
#2 Updated by Narihiro Nakamura over 2 years ago
- Status changed from Open to Closed