aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-09-09 13:02:24 +0200
committerMartin Liska <mliska@suse.cz>2021-10-13 15:26:58 +0200
commit72e0c742bd01f8e7e6dcca64042b9ad7e75979de (patch)
treeb902a8580178ec7ed6d4dc9416679a4d92f81e78 /gcc/doc
parent489c8f27296362dcfbc967aecef17ba7c5cab0f2 (diff)
downloadgcc-72e0c742bd01f8e7e6dcca64042b9ad7e75979de.zip
gcc-72e0c742bd01f8e7e6dcca64042b9ad7e75979de.tar.gz
gcc-72e0c742bd01f8e7e6dcca64042b9ad7e75979de.tar.bz2
gcov: make profile merging smarter
Support merging of profiles that are built from a different .o files but belong to the same source file. Moreover, a checksum is verified during profile merging and so we can safely combine such profile. PR gcov-profile/90364 gcc/ChangeLog: * coverage.c (build_info): Emit checksum to the global variable. (build_info_type): Add new field for checksum. (coverage_obj_finish): Pass object_checksum. (coverage_init): Use 0 as checksum for .gcno files. * gcov-dump.c (dump_gcov_file): Dump also new checksum field. * gcov.c (read_graph_file): Read also checksum. * doc/invoke.texi: Document the behaviour change. libgcc/ChangeLog: * libgcov-driver.c (merge_one_data): Skip timestamp and verify checksums. (write_one_data): Write also checksum. * libgcov-util.c (read_gcda_file): Read also checksum field. * libgcov.h (struct gcov_info): Add new field.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c4c6532..03234c8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14882,6 +14882,10 @@ supports locking, the data files will be correctly updated. Unless
a strict ISO C dialect option is in effect, @code{fork} calls are
detected and correctly handled without double counting.
+Moreover, an object file can be recompiled multiple times
+and the corresponding @file{.gcda} file merges as long as
+the source file and the compiler options are unchanged.
+
@item
For profile-directed optimizations, compile the source files again with
the same optimization and code generation options plus