From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15974 invoked by alias); 31 May 2011 13:28:09 -0000 Received: (qmail 15965 invoked by uid 22791); 31 May 2011 13:28:09 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 May 2011 13:27:55 +0000 Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id p4VDRr0o017912 for ; Tue, 31 May 2011 06:27:53 -0700 Received: from pwi5 (pwi5.prod.google.com [10.241.219.5]) by kpbe19.cbf.corp.google.com with ESMTP id p4VDRpt6016579 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 31 May 2011 06:27:52 -0700 Received: by pwi5 with SMTP id 5so2081056pwi.3 for ; Tue, 31 May 2011 06:27:51 -0700 (PDT) Received: by 10.68.1.4 with SMTP id 4mr2184635pbi.397.1306848471710; Tue, 31 May 2011 06:27:51 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id c5sm40320pbj.89.2011.05.31.06.27.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2011 06:27:51 -0700 (PDT) From: Ian Lance Taylor To: Magnus Ekhall Cc: gcc-help@gcc.gnu.org Subject: Re: Flush profile-generate data References: Date: Tue, 31 May 2011 14:04:00 -0000 In-Reply-To: (Magnus Ekhall's message of "Tue, 31 May 2011 14:47:10 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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: 2011-05/txt/msg00450.txt.bz2 Magnus Ekhall writes: > I'm trying to generate data for profile based optimization by using > -fprofile-generate. > > The problem is that on the system I'm running the software never > exits. Therefore no .gcda-files get written. > > Is there a way to force a flush of the current gcda-data? Or some way > to work around the issue? Call the function __gcov_flush(). That will write out the current set of profile information and reset the counts to zero for future calls. Ian