(j3.2006) More on "contiguous"
keith bierman
khbkhb
Tue May 15 17:28:48 EDT 2007
On May 15, 2007, at 3:02 PM, Van Snyder wrote:
> g line 312, gprof is telling
gprof can be horribly, horribly wrong. Unless it's changed in the
years since I last looked (which seems doubtful unix people tend to
create new profilers not alter the zen nature of the old ones) it has
a clock granularity of 1/100th of a second, which happens to also be
the timer for a ton of system activities. I used to have some lecture
notes (from how to use the tools that I used to give lectures from)
where I had examples of gprof completely misallocating time from one
procedure to a completely different one in the call tree.
Depending on your platform, you may have some more advanced profiling
engines (some allow you to actually time code segments, others allow
you to choose smaller or larger time quanta for sampling than the
system timer ... either, both are useful. if you get consistent
results irrespective of the quantum size perhaps it's real. if it
varies a lot, chances are you've got something naster than your tool
is able to handle going on).
> ///ment and the next one is
> an IF statement, I assume the reported time is all spent at this line.
Or something else in the call tree (especially if the optimizer has
created routines out of loops, or things which appear so to gprof
(outlining, the obverse of inlining for example, or calling a
"memset" routine on your behalf for the special case of setting a
constant)
>
Keith H. Bierman keith.bierman at Sun.COM | khbkhb at gmail.com
Sun Microsystems Microelectronics Group | sun IM: khb AIM: kbiermank
5430 Nassau Circle East | 650-352-4432 voice+fax
Cherry Hills Village, CO 80113 | sun internal 68207
http://blogs.sun.com/khb | 303-997-2749
<speaking for myself, not Sun*> Copyright 2007
Keith H. Bierman keith.bierman at Sun.COM | khbkhb at gmail.com
Sun Microsystems Microelectronics Group |
5430 Nassau Circle East | 650-352-4432 voice+fax
Cherry Hills Village, CO 80113 | sun internal 68207
http://blogs.sun.com/khb | 303-997-2749
<speaking for myself, not Sun*> Copyright 2007
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20070515/38a766ad/attachment.html
More information about the J3
mailing list