[all-commits] [llvm/llvm-project] d6fadc: [gcov] Process .gcda immediately after the accompa...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Sep 12 13:53:24 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d6fadc49e3d7eb0977bca3ff92bf156bd059fcd4
      https://github.com/llvm/llvm-project/commit/d6fadc49e3d7eb0977bca3ff92bf156bd059fcd4
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-09-12 (Sat, 12 Sep 2020)

  Changed paths:
    M clang/test/CodeGen/code-coverage.c
    M llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp

  Log Message:
  -----------
  [gcov] Process .gcda immediately after the accompanying .gcno instead of doing all .gcda after all .gcno

i.e. change the work flow from

* .gcno for function A
* .gcno for function B
* .gcno for function C
* .gcda for function A
* .gcda for function B
* .gcda for function C

to

* .gcno for function A
* .gcda for function A
* .gcno for function B
* .gcda for function B
* .gcno for function C
* .gcda for function C

Currently there is duplicate logic in .gcno & .gcda processing: how functions
are filtered, which edges are instrumented, etc. This refactor enables simplification.

Since we always process .gcno, in -fprofile-arcs -fno-test-coverage mode,
__llvm_internal_gcov_emit_function_args.0 will have non-zero checksums.




More information about the All-commits mailing list