linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Profiling a program's runtime
@ 2011-02-04 14:38 Christoph Bartoschek
  2011-02-04 17:16 ` Frederic Weisbecker
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph Bartoschek @ 2011-02-04 14:38 UTC (permalink / raw)
  To: linux-perf-users

Hi,

I would like to get a callgraph for the whole time a program runs. Is this 
possible with perf?

Most profilers I know only show me where the cputime is spent. But I would 
like to know how the wall time is used and in which functions. It's hard for 
me to explain what I mean, therefore I try it with an example.

I have a program that consists basically of three functions:

func_calc() is a computationally intensive function.
func_netw() is a function that reads requests from the network.
func_disk() is a function that writes data to the filesystem.

One execution of the program might last 10 seconds. 5 seconds of the time 
the programms waits for network requests in a call to read(). 3 seconds are 
spent for calculations in func_calc() and 2 seconds pass while the programm 
blocks on the write() requests in func_disk().

Overall the profiler should tell me that 50% of runtime are used by 
func_netw(), 30% are used by func_calc() and 20% are used by func_disk().

Most of the time I want to ignore the time the program spents to wait for 
the scheduler.

How can such a profile be generated with perf?

Christoph

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-07 20:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-04 14:38 Profiling a program's runtime Christoph Bartoschek
2011-02-04 17:16 ` Frederic Weisbecker
2011-02-04 17:41   ` Christoph Bartoschek
2011-02-04 17:47     ` Frederic Weisbecker
2011-02-04 18:10       ` David Ahern
2011-02-04 18:33         ` Maucci, Cyrille
2011-02-04 19:48           ` Christoph Bartoschek
2011-02-04 19:57             ` Maucci, Cyrille
2011-02-07 20:38               ` Arnaldo Carvalho de Melo
2011-02-04 19:51         ` Christoph Bartoschek
2011-02-05  0:56           ` David Ahern
2011-02-04 19:24       ` Christoph Bartoschek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).