public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/97507] New: Move __gcov_exit from per-object .fini_array.00100 to libgcov
@ 2020-10-20 19:48 i at maskray dot me
  2020-10-21  7:39 ` [Bug gcov-profile/97507] " marxin at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: i at maskray dot me @ 2020-10-20 19:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97507

            Bug ID: 97507
           Summary: Move __gcov_exit from per-object .fini_array.00100 to
                    libgcov
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: i at maskray dot me
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Per object file .fini_array.00100 wastes space. __gcov_exit can be called in
libgcov. It can be registered via atexit (if first run) in __gcov_init.

The Linux kernel does not call destructors and currently discards .fini_array
and .fini_array.*  `gcc -fprofile-arcs` is currently one reason that
.fini_array needs to be discarded (another reason is kasan. I don't know other
reasons)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gcov-profile/97507] Move __gcov_exit from per-object .fini_array.00100 to libgcov
  2020-10-20 19:48 [Bug gcov-profile/97507] New: Move __gcov_exit from per-object .fini_array.00100 to libgcov i at maskray dot me
@ 2020-10-21  7:39 ` marxin at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-21  7:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97507

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-10-21

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Well, we to run after all atexit and dtors, as seen here:
gcc/testsuite/g++.dg/gcov/pr16855-priority.C

I guess the Linux kernel handles __gcov_exit as it's own as it provides its own
run-time.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-21  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 19:48 [Bug gcov-profile/97507] New: Move __gcov_exit from per-object .fini_array.00100 to libgcov i at maskray dot me
2020-10-21  7:39 ` [Bug gcov-profile/97507] " marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).