From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8141 invoked by alias); 24 Aug 2008 06:02:07 -0000 Received: (qmail 8133 invoked by uid 22791); 24 Aug 2008 06:02:06 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 24 Aug 2008 06:01:32 +0000 Received: by nf-out-0910.google.com with SMTP id c10so725970nfd.6 for ; Sat, 23 Aug 2008 23:01:29 -0700 (PDT) Received: by 10.210.59.14 with SMTP id h14mr20191eba.13.1219557689683; Sat, 23 Aug 2008 23:01:29 -0700 (PDT) Received: by 10.210.74.8 with HTTP; Sat, 23 Aug 2008 23:01:29 -0700 (PDT) Message-ID: <1d7c6ac80808232301y2fcad20bya92de69adc4be776@mail.gmail.com> Date: Sun, 24 Aug 2008 06:46:00 -0000 From: "nimble dude" To: gcc-help@gcc.gnu.org Subject: Re: Can gcc-4.2 be used to measure coverage on SMP platforms? In-Reply-To: <1d7c6ac80808142036k7459eb68hbebb027615cc2fcb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1d7c6ac80808142036k7459eb68hbebb027615cc2fcb@mail.gmail.com> Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00268.txt.bz2 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 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 >