logo       

Re: Wildly inaccurate profiling results: msg#00050

lang.haskell.glasgow.bugs

Subject: Re: Wildly inaccurate profiling results

On Tue, Oct 21, 2003 at 05:21:37PM +0100, Simon Marlow wrote:
>
> I think the profiler only measures CPU time, so if the program is
> waiting for I/O or sleeping a lot of the time, that won't be included in
> the profile.
>

I don't think that's the issue -- when I run the program with debugging flags
on that print out what it's doing, I can tell that it spends at most the first
minute reading in files, and at most the last minute writing files (out of 5.5
minutes). Also, "top" shows that the program is using around 97% of the CPU
for most of its run.

> Also, the overhead due to heap rofiling can sometimes be a lot, because
> it includes the time to scan the heap and collect the census data.
> Retainer profiling (+RTS -hr) is also especially expensive. You should
> see the profiling overheads drop considerably when not doing heap
> profiling, though.
>

I'm not doing any heap profiling -- the only profiling flag I'm using is -P.
When I recompiled the program without any profiling and ran it again, it took
about 4 minutes as opposed to 5.5, suggesting that the 34 seconds reported by
profiling really is inaccurate.


--
Kirsten Chevalier * krc@xxxxxxxxxxxxxxx * Often in error, never in doubt
"I wish people weren't so set on being themselves, when that means being a
bastard." -- Robertson Davies
http://www.cs.berkeley.edu/~krc/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise