From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21876 invoked by alias); 15 Aug 2008 03:37:14 -0000 Received: (qmail 21863 invoked by uid 22791); 15 Aug 2008 03:37:13 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.190) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Aug 2008 03:36:38 +0000 Received: by nf-out-0910.google.com with SMTP id c10so612274nfd.6 for ; Thu, 14 Aug 2008 20:36:36 -0700 (PDT) Received: by 10.210.126.18 with SMTP id y18mr2413582ebc.100.1218771396243; Thu, 14 Aug 2008 20:36:36 -0700 (PDT) Received: by 10.210.74.8 with HTTP; Thu, 14 Aug 2008 20:36:36 -0700 (PDT) Message-ID: <1d7c6ac80808142036k7459eb68hbebb027615cc2fcb@mail.gmail.com> Date: Fri, 15 Aug 2008 11:08:00 -0000 From: "nimble dude" To: gcc-help@gcc.gnu.org Subject: Can gcc-4.2 be used to measure coverage on SMP platforms? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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/msg00148.txt.bz2 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