This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Flush profile-generate data
- From: Ian Lance Taylor <iant at google dot com>
- To: Magnus Ekhall <magnus dot ekhall at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 31 May 2011 06:27:49 -0700
- Subject: Re: Flush profile-generate data
- References: <BANLkTikzMieKXBBFACEZ5PA5-L8uv7eZ6Q@mail.gmail.com>
Magnus Ekhall <magnus.ekhall@gmail.com> 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