<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
El 19/10/07 16:47, Jeff Muizelaar escribió:
<blockquote cite="mid20071019184753.GB8004@infidigm.net" type="cite">
<pre wrap="">On Fri, Oct 19, 2007 at 02:42:51PM -0400, Jeff Muizelaar wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Fri, Oct 19, 2007 at 04:18:12PM -0200, Ivan Baldo wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
El 18/10/07 19:38, Dan Amelang escribió:
</pre>
<blockquote type="cite">
<pre wrap="">On 10/17/07, Ivan Baldo <a class="moz-txt-link-rfc2396E" href="mailto:ibaldo@adinet.com.uy"><ibaldo@adinet.com.uy></a> wrote:
</pre>
<br>
</blockquote>
<pre wrap=""> To repeat, I would like a call-graph that says something like this:
main
77% testslow
77% test
22% testfast
22% test
testslow
100% test
testfast
100% test
</pre>
</blockquote>
<pre wrap="">Sysprof can do this. The important point here is that you want to record
an entire backtrace at each sampling point instead of just the program
counter. I'm not sure whether gprof, qprof, or oprofile support
capturing an entire backtrace, but sysprof certainly does.
However, because you are using X and that is where the majority of the
cpu time is being spent. Sysprof will not be able to associate the time
spent in X with the calling function (testfast or testslow) because the
backtraces stay inside each process.
</pre>
</blockquote>
<pre wrap=""><!---->
It may also be possible to do single process profiling where time
sleeping gets accounted to the function that caused the sleeping.
However, I don't know of any tools that do this. (There might be some, I
haven't really ever looked...)
One possible way of doing this would be to use setitimer with
ITIMER_REAL instead of ITIMER_PROF which is what I expect qprof uses.
</pre>
</blockquote>
Yes, I can run qprof with the QPROF_REAL environment variable set
and it will use ITIMER_REAL and SIGALRM to wake up to take the samples,
so that could be a start but I have a problem: it has problems to
resolve some program counters (eip on my i386) with addr2line,
specially one that takes 99% of the time, so it becomes useless :-(.<br>
Can someone test the example program I sent with QProf using the
QPROF_REAL environment variable and see if it gets some meaningful
results?<br>
I use Debian Testing fairly updated and QProf from Unstable.<br>
Thanks to all!<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ivan Baldo - <a class="moz-txt-link-abbreviated" href="mailto:ibaldo@adinet.com.uy">ibaldo@adinet.com.uy</a> - <a class="moz-txt-link-freetext" href="http://ibaldo.codigolibre.net/">http://ibaldo.codigolibre.net/</a>
ICQ 10215364 - Phone/FAX (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America.
We believe that we are free, but in reality we are not! Are we?
Alternatives: <a class="moz-txt-link-abbreviated" href="mailto:ibaldo@codigolibre.net">ibaldo@codigolibre.net</a> - <a class="moz-txt-link-freetext" href="http://go.to/ibaldo">http://go.to/ibaldo</a>
</pre>
</body>
</html>