From 97a53d1d04d5dc36f64c0897ff0c49c78ef83ffc Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 5 Jun 2018 14:10:22 +0200 Subject: Support variables in expansion of -fprofile-generate option (PR gcov-profile/47618). 2018-06-05 Martin Liska PR gcov-profile/47618 * doc/invoke.texi: Document how -fprofile-dir format is extended. 2018-06-05 Martin Liska PR gcov-profile/47618 * libgcov-driver-system.c (replace_filename_variables): New function. (gcov_exit_open_gcda_file): Use it. From-SVN: r261199 --- gcc/ChangeLog | 6 ++++++ gcc/doc/invoke.texi | 14 ++++++++++++++ 2 files changed, 20 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f5f4e4..25ab6bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-06-05 Martin Liska + + PR gcov-profile/47618 + * doc/invoke.texi: Document how -fprofile-dir format + is extended. + 2018-06-05 Richard Biener * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 169dd44..3d767b6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -11343,6 +11343,20 @@ and its related options. Both absolute and relative paths can be used. By default, GCC uses the current directory as @var{path}, thus the profile data file appears in the same directory as the object file. +When an executable is run in a massive parallel environment, it is recommended +to save profile to different folders. That can be done with variables +in @var{path} that are exported during run-time: + +@table @gcctabopt + +@item %p +process ID. + +@item %q@{VAR@} +value of environment variable @var{VAR} + +@end table + @item -fprofile-generate @itemx -fprofile-generate=@var{path} @opindex fprofile-generate -- cgit v1.1