HomePhabricator

[CSSPGO][llvm-profgen] Renovate perfscript check and command line input…

Authored by wlei on Feb 9 2021, 4:41 PM.

Description

[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.
  1. Added several input validations for the command line switches in PerfReader.
  1. 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