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

Joel Rosdahl joel at rosdahl.net
Fri Jul 29 11:03:47 MDT 2011

On 2011-07-25 21:19, Chris AtLee wrote:
> I've pushed some changes up here that I hope addresses all the comments:
> https://github.com/catlee/ccache/compare/jrosdahl:master...catlee:profile

Looks mostly good! Thanks for working in this.

Regarding "TODO: Disable base_dir if profile_dir is NULL?": Yes,
perhaps; it doesn't really matter since you hash CWD in that case, so
base_dir will have no effect anyway. (And by the same logic, base_dir
could also be disabled if CCACHE_HASHDIR is set.)

Some code paths are missing a free(arg) in cc_process_args.

I think it would be better to always allocate profile_dir on the heap,
thus simplifying cc_reset.

I guess "output_to_real_object_first = false" is a left-over from debugging?

There are still some //-style comments.

The added cc_log that says "Failed to move" in to_cache should be
"Failed to copy".

And like last time, Justin Lebar's comments are also relevant (thanks,

-- Joel

More information about the ccache mailing list