Re: [wwwdocs] changes.html - PGO and GCOV changes
On Wed, 25 Jan 2017, Martin Liška wrote: > Following patch adds what was said in the changes file to our > documentation. +constructors with priority support, the profiling properly handles constructors, +destructors and C++ constructors (and destructors) of classes which are used Just "profiling" (without "the" before). And the lines appear a little long? Okay to commit otherwise. Thanks, Gerald
Re: [wwwdocs] changes.html - PGO and GCOV changes
Hello. Following patch adds what was said in the changes file to our documentation. Thanks, Martin >From 0da7f4d9a2a895e63271e9dc870814c6c7e3f419 Mon Sep 17 00:00:00 2001 From: marxinDate: Wed, 25 Jan 2017 16:41:23 +0100 Subject: [PATCH] Enhance doc for -fprofile-arcs gcc/ChangeLog: 2017-01-25 Martin Liska * doc/invoke.texi (-fprofile-arcs): Document profiling support for {cd}tors and C++ {cd}tors. --- gcc/doc/invoke.texi | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6a42193d106..223a0aed7af 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10584,7 +10584,12 @@ linking. @opindex fprofile-arcs Add code so that program flow @dfn{arcs} are instrumented. During execution the program records how many times each branch and call is -executed and how many times it is taken or returns. When the compiled +executed and how many times it is taken or returns. On targets that support +constructors with priority support, the profiling properly handles constructors, +destructors and C++ constructors (and destructors) of classes which are used +as a type of a global variable. + +When the compiled program exits it saves this data to a file called @file{@var{auxname}.gcda} for each source file. The data may be used for profile-directed optimizations (@option{-fbranch-probabilities}), or for -- 2.11.0
[wwwdocs] changes.html - PGO and GCOV changes
Hello. Following patch documents changes in PGO and GCOV which were done for upcoming GCC 7.1. Thanks for feedback, Martin --- /tmp/wwwdocs/htdocs/gcc-7/changes.html 2017-01-25 11:10:56.0 +0100 +++ htdocs/gcc-7/changes.html 2017-01-25 14:48:56.257587082 +0100 @@ -630,6 +630,18 @@ GCC has gained an internal unit-testing framework, allowing for more detailed testing of its implementation details. + + Profile-guided optimization (PGO) instrumentation, as well as test coverage (GCOV), + can newly instrument constructors (functions marks with __attribute__((constructor))), + destructors and C++ constructors (and destructors) of classes that are used + as a type of a global variable. + + A new option -fprofile-update=atomic prevents creation of corrupted + profiles created during instrumentation run (-fprofile=generate) + of an application. Downside of the option is a speed penalty. Providing + -pthread on command line would result in selection of atomic + profile updating (when supports by a target). +