From: Dr Adrian Wrigley <amtw@linuxchip.demon.co.uk>
Subject: Re: gcov in multithreaded applications
Date: Thu, 07 Sep 2000 23:44:28 GMT
Date: 2000-09-07T23:44:28+00:00 [thread overview]
Message-ID: <39B8286C.2449C16F@linuxchip.demon.co.uk> (raw)
In-Reply-To: 8oip2j$ut0$1@nnrp1.deja.com
daelen@my-deja.com wrote:
>
> I am working with Gnat 3.13a on Windows NT 4.0.
>
> I would like to use gcov to profile our application containing several tasks.
If I my experience profiling code with multiple tasks is virtually futile.
At least on the Gnat 3.11/Linux on Intel architecture, the basic block
counting code is not thread-safe :( This stops reliable block profiling
with gcov under gcc. I was using native (Linux) threads.
Further, the function/procedure counting was not thread safe either
(the mcount does not protect the count). This leads to spurious
values in a "gprof" profile of function counts/timing.
I was unable to resolve the problem under support from ACT, as it
seems to be a problem with the "mcount" in the profiling library,
and gcov style block profiling doesn't seem to be supported.
I had some success with my own thread-safe alternative to "mcount",
but the performance drag was very significant (worse than 3x for
heavily nested calling). Also, some success enabling profiling
dynamically on a per function basis, by one thread at a time.
All this is from memory of over a year ago. Things may have changed.
I may have misremembered. Profiling on NT may have fixed the gcov bug.
Did you get the results you wanted, Jorg? Were they reliable?
--
Adrian Wrigley.
prev parent reply other threads:[~2000-09-07 23:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-30 0:00 gcov in multithreaded applications daelen
2000-08-30 0:00 ` Robert A Duff
2000-08-31 21:58 ` Jean-Pierre Rosen
2000-09-07 23:44 ` Dr Adrian Wrigley [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox