From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 84F99393A433; Sun, 7 Mar 2021 20:58:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84F99393A433 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/99443] [GCOV] No coverage with "Aborted(core dumped)" Date: Sun, 07 Mar 2021 20:58:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 20:58:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99443 --- Comment #4 from Andrew Pinski --- It is not well documented though. https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Gcov-and-Optimization.html#Gc= ov-and-Optimization Long-running applications can use the __gcov_reset and __gcov_dump faciliti= es to restrict profile collection to the program region of interest. Calling __gcov_reset(void) will clear all profile counters to zero, and calling __gcov_dump(void) will cause the profile information collected at that poin= t to be dumped to .gcda output files. ** Instrumented applications use a static destructor with priority 99 to invoke the __gcov_dump function.** Thus __gcov_dump is executed after all user defined static destructors, as well = as handlers registered with atexit. If an executable loads a dynamic shared ob= ject via dlopen functionality, -Wl,--dynamic-list-data is needed to dump all pro= file data. ----- CUT ----=