public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Can gcc-4.2 be used to measure coverage on SMP platforms?
@ 2008-08-15 11:08 nimble dude
  2008-08-24  6:46 ` nimble dude
  0 siblings, 1 reply; 3+ messages in thread
From: nimble dude @ 2008-08-15 11:08 UTC (permalink / raw)
  To: gcc-help

Hello,

    I have a newbie question about gcov and SMP support in gcov.

    I am trying to measure the coverage information of a
multi-threaded application running on an SMP platform. I compiled the
image with "-fprofile-arcs -ftest-coverage" and linked with -lgcov.
All optimizations were turned off. When the coverage was observed,
some of the counters were wrong. Sure enough, in the disassembly
output, the incrementing of the gcov related variables was not atomic.
Searching gcc manuals for further info on gcov did not yield any
information. The documentation on SMP and gcov support is rather
sparse.

- Does gcc-4.2 support atomic_increment of the gcov related information?
- If so, is there another option that needs to be specified along with "gcc"
- Does gcc-4.3.1 support atomic_increment of gcov counters
natively(i.e, without further flags)?

I appreciate your help in advance. Please excuse if this is already
mentioned in documentation.

Thank you,
Ram

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

* Re: Can gcc-4.2 be used to measure coverage on SMP platforms?
  2008-08-15 11:08 Can gcc-4.2 be used to measure coverage on SMP platforms? nimble dude
@ 2008-08-24  6:46 ` nimble dude
  2008-08-26 10:22   ` Holger Blasum
  0 siblings, 1 reply; 3+ messages in thread
From: nimble dude @ 2008-08-24  6:46 UTC (permalink / raw)
  To: gcc-help

2nd try...
Would be grateful if somebody could confirm one way or the other.



On Thu, Aug 14, 2008 at 8:36 PM, nimble dude <nimble.dude@gmail.com> wrote:
> Hello,
>
>    I have a newbie question about gcov and SMP support in gcov.
>
>    I am trying to measure the coverage information of a
> multi-threaded application running on an SMP platform. I compiled the
> image with "-fprofile-arcs -ftest-coverage" and linked with -lgcov.
> All optimizations were turned off. When the coverage was observed,
> some of the counters were wrong. Sure enough, in the disassembly
> output, the incrementing of the gcov related variables was not atomic.
> Searching gcc manuals for further info on gcov did not yield any
> information. The documentation on SMP and gcov support is rather
> sparse.
>
> - Does gcc-4.2 support atomic_increment of the gcov related information?
> - If so, is there another option that needs to be specified along with "gcc"
> - Does gcc-4.3.1 support atomic_increment of gcov counters
> natively(i.e, without further flags)?
>
> I appreciate your help in advance. Please excuse if this is already
> mentioned in documentation.
>
> Thank you,
> Ram
>

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

* Re: Can gcc-4.2 be used to measure coverage on SMP platforms?
  2008-08-24  6:46 ` nimble dude
@ 2008-08-26 10:22   ` Holger Blasum
  0 siblings, 0 replies; 3+ messages in thread
From: Holger Blasum @ 2008-08-26 10:22 UTC (permalink / raw)
  To: nimble dude; +Cc: gcc-help

On Sat, Aug 23, 2008 at 11:01:29PM -0700, nimble dude wrote:
> > Searching gcc manuals for further info on gcov did not yield any
> > information. The documentation on SMP and gcov support is rather
> > sparse.
> > - Does gcc-4.2 support atomic_increment of the gcov related information?
> > - If so, is there another option that needs to be specified along with "gcc"
> 2nd try...
> Would be grateful if somebody could confirm one way or the other.

Concerning gcc version 3:
"Especially our implementation does not support threading
and is not able to cope very well with constructors, destructors 
and dynamically loaded objects yet." J Hubicka 2005, Profile driven 
optimisations in GCC, in: Proceedings of the GCC Developers' Summit, 
June 21-24, 2005, Ottawa, Canada, pp. 107-124, 
http://www.gccsummit.org/2005/2005-GCC-Summit-Proceedings.pdf

But that was in 2005, for gcc-4.x you may want to double-check with the 
lcov list https://lists.sourceforge.net/lists/listinfo/ltp-coverage that
also has gcov users. (Note: if you do not want exact numbers 
but just the conservative information whether something is covered at 
all or not you might make use of the non-SMP code instrumentation 
(please carefully observe the generated code on your platform) - one 
of (possibly more) preparations (eg avoid counter overflow) would 
be to modify the instrumentation in find_spanning_tree.)

> > - Does gcc-4.3.1 support atomic_increment of gcov counters
> > natively(i.e, without further flags)?

Is there any indication that atomic_increment of gcov counters 
is supported non-natively, that is with further flags?

-- 
Holger Blasum
SYSGO AG Office Mainz
Web: http://www.sysgo.com

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

end of thread, other threads:[~2008-08-26  6:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-15 11:08 Can gcc-4.2 be used to measure coverage on SMP platforms? nimble dude
2008-08-24  6:46 ` nimble dude
2008-08-26 10:22   ` Holger Blasum

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 read-only IMAP folder(s) and NNTP newsgroup(s).