8sa1-gcc/gcc/doc
Jan Hubicka 44b326839d Make it possible to have different instrumented and feedback builds without copying gcda files around [pr93401]
Hi,
in GCC 8 we changed -fprofile-generate=<path> to use mangled absolute paths in
the <path> directory. This was necessary to avoid clashes of files when gcc is
executed from different directories to build different sources of same
filename.

However this made it difficult to build projects on setups where instrumented
build is done in one directory, feedback build in different and possibly
training happens in yet another directory structure.  This happens i.e. for
Firefox builds for month or two.

This patch adds -fprofile-prefix-path that can be used to inform gcc where the
root of build directory is and strip it form the gcda filenames.
This is similar to exisitng debug-prefix-map but without the map feature since
it seems useless for profile data.

We spent quite some time with Maritn Liska discussing options and found no
better solution.  I was looking how this work on LLVM and they produce single
profdata file which is then transformed into kind of simple database by
llvmprofdata tool.  This database keys functions by filename and symbol name.
If you arrane two files with same name define static variable with same symbol
name this gets messedup and result in wrong info. So I think this is not very
good solution and preffer the extra option.

Bootstrapped/regtested x86_64-linux. I plan to commit it later today if there
are no complains.

I suppose our manual could have some central section on profile feedback
explaining the whole setup at one place.

Honza

	PR gcov-profile/93401
	* common.opt (profile-prefix-path): New option.
	* coverae.c: Include diagnostics.h.
	(coverage_init): Strip profile prefix path.
	* doc/invoke.texi (-fprofile-prefix-path): Document.
2020-04-16 14:27:20 +02:00
..
include
analyzer.texi
avr-mmcu.texi
bugreport.texi
cfg.texi
collect2.texi
compat.texi
configfiles.texi
configterms.texi
contrib.texi
contribute.texi
cpp.texi
cppdiropts.texi
cppenv.texi
cppinternals.texi
cppopts.texi
cppwarnopts.texi
extend.texi Minor documentation fix 2020-04-13 13:29:13 -06:00
fragments.texi
frontends.texi
gcc.texi
gccint.texi
gcov-dump.texi
gcov-tool.texi
gcov.texi
generic.texi
gimple.texi
gnu.texi
gty.texi
headerdirs.texi
hostconfig.texi
implement-c.texi
implement-cxx.texi
install-old.texi
install.texi doc: RISC-V: Update binutils requirement to 2.30 2020-04-02 15:43:05 +01:00
install.texi2html
interface.texi
invoke.texi Make it possible to have different instrumented and feedback builds without copying gcda files around [pr93401] 2020-04-16 14:27:20 +02:00
languages.texi
libgcc.texi
loop.texi
lto-dump.texi
lto.texi
makefile.texi
match-and-simplify.texi
md.texi md.texi (Define Subst): Match closing paren in example. 2020-02-10 16:39:58 +01:00
objc.texi
optinfo.texi
options.texi
passes.texi
plugins.texi
poly-int.texi
portability.texi
rtl.texi
service.texi
sourcebuild.texi aarch64: Add support for arm_sve_vector_bits 2020-04-09 17:11:12 +01:00
standards.texi
tm.texi Fix up duplicated duplicated words mostly in comments 2020-03-17 13:52:19 +01:00
tm.texi.in doc: Fix up ASM_OUTPUT_ALIGNED_DECL_LOCAL description 2020-03-12 09:35:30 +01:00
tree-ssa.texi
trouble.texi
ux.texi