This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/47618] Collecting multiple profiles and using all for PGO
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Jun 2017 19:05:52 +0000
- Subject: [Bug gcov-profile/47618] Collecting multiple profiles and using all for PGO
- Auto-submitted: auto-generated
- References: <bug-47618-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47618
--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 41481
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41481&action=edit
Patch candidate
I'm attaching patch that supports following expansion of -fprofile-dir (or
arguments of -fprofile-generate and -fprofile-use) option value:
%w - expands during compile time to working directory; it's handy when one
wants to preserve tree hierarchy of gcda files corresponding to another build
directory
%p - expands during run-time to PID
%q{ENV} - expands to value of environmental variable 'ENV' during run-time
Having that, I guess we can eventually drop GCOV_PREFIX_STRIP and GCOV_PREFIX
as one can use -fprofile-dir="%q{PREFIX}" and then e.g. set
PREFIX="../my/folder/".
Feel free to comment the patch.