Project

General

Profile

Bug #4991

Add a method to retrieve raw data from GC::Profiler

Added by drbrain (Eric Hodel) about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:37857]

Description

GC::Profiler.result gives a String report but there is no access to the raw profile data. There is no way to extract data for automatic comparison without parsing the output String.

The attached patch adds GC::Profile.data which exposes gc_profile_record_get.

This allows tools that can automatically compare profile runs to be written without parsing.

gc.c.profiler_data.patch (1.6 KB) gc.c.profiler_data.patch drbrain (Eric Hodel), 07/08/2011 09:34 AM

Related issues

Has duplicate Ruby trunk - Bug #5292: Access to GC::Profiler RecordsClosed2011-09-07

Associated revisions

Revision 33224
Added by nari almost 6 years ago

* gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
patch by Eric Hodel. [Bug #4991]

Revision 33224
Added by nari almost 6 years ago

* gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
patch by Eric Hodel. [Bug #4991]

Revision 33224
Added by nari almost 6 years ago

* gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
patch by Eric Hodel. [Bug #4991]

Revision 33224
Added by nari almost 6 years ago

* gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
patch by Eric Hodel. [Bug #4991]

History

#1 [ruby-core:38489] Updated by naruse (Yui NARUSE) about 6 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)
  • Target version set to 2.0.0

#2 [ruby-core:39334] Updated by authorNari (Narihiro Nakamura) almost 6 years ago

Hi.

In fact, i proposed GC::Profiler.data at 2008/7/26 on ruby-core ML.
But it's rejected, because matz said "more appropriate name" to me.

#3 [ruby-core:39352] Updated by cfis (Charlie Savage) almost 6 years ago

Ok, some other ideas then:

records
stats
runs
results (although there is result already)
log
history
raw_data
raw

Any sound good?

#4 [ruby-core:39357] Updated by authorNari (Narihiro Nakamura) almost 6 years ago

Charlie Savage wrote:

Ok, some other ideas then:

records
stats
runs
results (although there is result already)
log
history
raw_data
raw

Any sound good?

Thanks!!

I like GC::Profiler.raw_data.

Matz, What do you think?

#5 [ruby-core:39359] Updated by matz (Yukihiro Matsumoto) almost 6 years ago

  • ruby -v changed from ruby 1.9.3dev (2011-07-08 trunk 32440) [x86_64-darwin10.8.0] to -

Hi,

In message "Re: [Ruby 1.9 - Bug #4991] Add a method to retrieve raw data from GC::Profiler"
on Thu, 8 Sep 2011 11:51:42 +0900, Narihiro Nakamura authorNari@gmail.com writes:

|I like GC::Profiler.raw_data.
|
|Matz, What do you think?

raw_data is acceptable. Go ahead.

                        matz.

#6 Updated by authorNari (Narihiro Nakamura) almost 6 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33224.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • gc.c (Init_GC): defined GC::Profiler.raw_data. based on the patch by Eric Hodel. [Bug #4991]

Also available in: Atom PDF