[all-commits] [llvm/llvm-project] 48c196: [gcov] Move llvm_writeout_files from atexit to a s...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jul 1 16:42:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 48c196f5c8b339c347d0a4ecf944c942fa5df765
      https://github.com/llvm/llvm-project/commit/48c196f5c8b339c347d0a4ecf944c942fa5df765
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M compiler-rt/lib/profile/GCDAProfiling.c
    A compiler-rt/test/profile/Posix/gcov-destructor.c

  Log Message:
  -----------
  [gcov] Move llvm_writeout_files from atexit to a static destructor

atexit registered functions run earlier so `__attribute__((destructor))`
annotated functions cannot be tracked.

Set a priority of 100 (compatible with GCC 7 onwards) to track
destructors and destructors whose priorities are greater than 100.

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

Reviewed By: calixte, marco-c

Differential Revision: https://reviews.llvm.org/D82253




More information about the All-commits mailing list