[ccache] Support for -fprofile-generate, -fprofile-use, -fprofile-arcs

Chris AtLee chris at atlee.ca
Mon Aug 8 08:27:13 MDT 2011

On Mon, Aug 8, 2011 at 10:06 AM, Justin Lebar <justin.lebar at gmail.com> wrote:
> On Mon, Aug 8, 2011 at 9:58 AM, Chris AtLee <chris at atlee.ca> wrote:
>> Any thoughts on if caching the .gcda files is useful? Maybe have
>> another environment variable that switches it on?
> What do you mean?  These files aren't generated until the program is
> run, right?  So I guess what you're suggesting is that on the
> -fprofile-use pass, we'd remember the gcda file that was there.  Then
> on a later -fprofile-generate pass, if we have a cache hit, we'd
> restore both the object and the gcda file that object eventually
> created when it ran.

The .gcda files themselves aren't cached, their contents are used to
calculate the hash for a -fprofile-use run. So if the .o file doesn't
exist, and you have the same .gcda file, you get a cache hit.

More information about the ccache mailing list