[all-commits] [llvm/llvm-project] 138202: [llvm-profgen] Warn on invalid range and show warn...

ictwanglei via All-commits all-commits at lists.llvm.org
Tue Nov 2 19:58:51 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 138202a8c3552c57e00d95903fd8809de4fe0fed
      https://github.com/llvm/llvm-project/commit/138202a8c3552c57e00d95903fd8809de4fe0fed
  Author: wlei <wlei at fb.com>
  Date:   2021-11-02 (Tue, 02 Nov 2021)

  Changed paths:
    M llvm/test/tools/llvm-profgen/cs-invalid-ret-addr.test
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-profgen/PerfReader.h
    M llvm/tools/llvm-profgen/ProfiledBinary.cpp
    M llvm/tools/llvm-profgen/ProfiledBinary.h

  Log Message:
  -----------
  [llvm-profgen] Warn on invalid range and show warning summary

Two things in this diff:

1) Warn on the invalid range, currently three types of checking, see the detailed message in the code.

2) In some situation, llvm-profgen gives lots of warnings on the truncated stacks which is noisy. This change provides a switch to `--show-detailed-warning` to skip the warnings. Alternatively, we use a summary for those warning and show the percentage of cases with those issues.

Example of warning summary.
```
warning: 0.05%(1120/2428958) cases with issue: Profile context truncated due to missing probe for call instruction.
warning: 0.00%(2/178637) cases with issue: Range does not belong to any functions, likely from external function.
```

Reviewed By: hoy

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


  Commit: dc9f037955127b8421c6e2d22e5a56de3f68b90e
      https://github.com/llvm/llvm-project/commit/dc9f037955127b8421c6e2d22e5a56de3f68b90e
  Author: wlei <wlei at fb.com>
  Date:   2021-11-02 (Tue, 02 Nov 2021)

  Changed paths:
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-profgen/PerfReader.h

  Log Message:
  -----------
  [llvm-profgen] Refactor the code of getHashCode

Refactor to generate hash code lazily. Tested on clang self build, no observable generating time regression.

Reviewed By: hoy, wenlei

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


Compare: https://github.com/llvm/llvm-project/compare/57e093162e27...dc9f03795512


More information about the All-commits mailing list