I would like to profile ruby 2.0. I compiled it with CFLAGS=’-O0 -pg’,
which made ruby executable to produce gmon.out file. It is about 900k
big. The problem is, when I open it with gperf ruby gmon.out -p, I
receive blank output (without any information about function call). I
know that granularity of gperf is 0.01s, which is quite big, but
Guys, has anyone tried profiling ruby interpreter?
The output of gperf:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.