Magnus Ekhall <magnus.ekhall@xxxxxxxxx> 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