This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-fprofile-generate and multiple runs
- From: Martin Mitáš <mity at morous dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 24 Sep 2011 11:41:05 +0200
- Subject: -fprofile-generate and multiple runs
Hi.
I'm working on a shared lib which I would like to optimize
with profile guided optimization. I would prefer to have
multiple small programs (one for typical use case), each
examining a single module of the lib rather then one big
program covering complete lib's API, and to generate the
profile by running all those use cases.
When built with -fprofile-generate, and the resulted binary
is executed multiple times, are the .gcda files (re)written
from scratch every time, or are they updated so they contain
a combined profile data from multiple runs?
Any other gotchas this approach might bring?
gcc manual does not provide any details about this...
Thanks in advance,
Mity