[all-commits] [llvm/llvm-project] 426e32: [CSSPGO][llvm-profgen] Renovate perfscript check a...

ictwanglei via All-commits all-commits at lists.llvm.org
Fri Feb 12 15:19:33 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 426e326a19fe7888e1975e94cd6b1cd8233e5268
      https://github.com/llvm/llvm-project/commit/426e326a19fe7888e1975e94cd6b1cd8233e5268
  Author: wlei <wlei at fb.com>
  Date:   2021-02-12 (Fri, 12 Feb 2021)

  Changed paths:
    M llvm/test/tools/llvm-profgen/disassemble.s
    A llvm/test/tools/llvm-profgen/invalid-perfscript.test
    M llvm/test/tools/llvm-profgen/pseudoprobe-decoding.test
    M llvm/test/tools/llvm-profgen/symbolize.ll
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-profgen/PerfReader.h
    M llvm/tools/llvm-profgen/ProfileGenerator.cpp
    M llvm/tools/llvm-profgen/ProfiledBinary.cpp
    M llvm/tools/llvm-profgen/llvm-profgen.cpp

  Log Message:
  -----------
  [CSSPGO][llvm-profgen] Renovate perfscript check and command line input validation

This include some changes related with PerfReader's the input check and command line change:

1) It appears there might be thousands of leading MMAP-Event line in the perfscript for large workload. For this case, the 4k threshold is not eligible to determine it's a hybrid sample. This change renovated the `isHybridPerfScript` by going through the script without threshold limitation checking whether there is a non-empty call stack immediately followed by a LBR sample. It will stop once it find a valid one.

2) Added several input validations for the command line switches in PerfReader.

3) Changed the command line `show-disassembly` to `show-disassembly-only`, it will print to stdout and exit early which leave an empty output profile.

Reviewed By: hoy, wenlei

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




More information about the All-commits mailing list