diff mbox series

DOC: update documentation of __gcov_{dump,reset}

Message ID 692c5b84-cada-c3ac-635f-71950b5f1f62@suse.cz
State New
Headers show
Series DOC: update documentation of __gcov_{dump,reset} | expand

Commit Message

Martin Liška May 25, 2021, 7:54 a.m. UTC
Hi.

Based on the PR, I suggest improvement of the documentation for GCOV-related functions.
I'll install the patch if there are no objections.

Martin

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.
---
  gcc/doc/gcov.texi | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index 1ad99e5569e..d076721b93c 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.