This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gcov-profile/47618] Collecting multiple profiles and using all for PGO


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]