Cumulative samples without callgraph?

Nikolaus Rath <[email protected]>
Newsgroups gmane.linux.oprofile
Organization Tri Alpha Energy
Message-ID <[email protected]>
Hello,

I have gathered some profile data using just "operf <program>" (i.e., no
-g option to gather callgraph data).

However, when looking at the gmon output with

$ opgprof <program>
$ gprof -p <program> | head

I find that there are distinct counts for cumulative and self:

> Flat profile:
> 
> Each sample counts as 1 samples.
>   %   cumulative   self              self     total           
>  time   samples   samples    calls  T1/call  T1/call  name    
>   5.19 14089090.00 14089090.00                             dagmg_mumps_302_
>   4.85 27256080.00 13166990.00                             mcdriver_mp_mc_push_
>   4.83 40373868.00 13117788.00                             dagmg_mumps_249_
>   4.56 52738720.00 12364852.00      


I'm confused by this. Doesn't "cumulative" mean the time spend in a
function including time spend in calls to other functions? But if operf
didn't look at the callgraph, how can it know anything about this? I
thought that for every sample operf just records what function is being
executed, but not how this function was called.

Best,
-Nikolaus
-- 
Nikolaus Rath, Ph.D.
Senior Scientist
Tri Alpha Energy, Inc.
+1 949 830 2117 ext 211

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.