aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-05-25 09:52:01 +0200
committerMartin Liska <mliska@suse.cz>2021-05-26 09:33:51 +0200
commit403bb89bd7f4ec03d4dcbdf8668d0187358631a0 (patch)
treeec6e2f77297eeb0046907af94eb7fbe267fbdeae /gcc
parent0eac9c60ac1f28eeb7bb0a56e533865d984015f6 (diff)
downloadgcc-403bb89bd7f4ec03d4dcbdf8668d0187358631a0.zip
gcc-403bb89bd7f4ec03d4dcbdf8668d0187358631a0.tar.gz
gcc-403bb89bd7f4ec03d4dcbdf8668d0187358631a0.tar.bz2
DOC: update documentation of __gcov_{dump,reset}
gcc/ChangeLog: PR gcov-profile/100751 * doc/gcov.texi: Document that __gcov_dump can be called just once and that __gcov_reset resets run-time counters.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/doc/gcov.texi8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index 1ad99e5..d076721 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -885,13 +885,15 @@ same source lines, the line counts themselves might seem inconsistent.
Long-running applications can use the @code{__gcov_reset} and @code{__gcov_dump}
facilities to restrict profile collection to the program region of
-interest. Calling @code{__gcov_reset(void)} will clear all profile counters
-to zero, and calling @code{__gcov_dump(void)} will cause the profile information
-collected at that point to be dumped to @file{.gcda} output files.
+interest. Calling @code{__gcov_reset(void)} will clear all run-time profile
+counters to zero, and calling @code{__gcov_dump(void)} will cause the profile
+information collected at that point to be dumped to @file{.gcda} output files
+(the function can be called just once).
Instrumented applications use a static destructor with priority 99
to invoke the @code{__gcov_dump} function. Thus @code{__gcov_dump}
is executed after all user defined static destructors,
as well as handlers registered with @code{atexit}.
+
If an executable loads a dynamic shared object via dlopen functionality,
@option{-Wl,--dynamic-list-data} is needed to dump all profile data.