[PATCH] D110729: [llvm-profgen] Refactor and better diagnostics

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 29 09:38:09 PDT 2021


wenlei created this revision.
wenlei added reviewers: hoy, wlei, wmi.
Herald added subscribers: modimo, lxfind.
wenlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This change contains diagnostics improvments, refactoring and preparation for consuming perf data directly.

Diagnostics:

- We now have more detailed diagnostics when no mmap is found.
- We also print warning for abnormal transition to external code.

Refactoring:

- Simplify input perf trace processing to only allow a single input file. This is because 1) using multiple input perf trace (perf script) is error prone because we may miss key mmap events. 2) the functionality is not really being used anyways.
- Make more functions private for Readers, move non-trivial definitions out of header. Cleanup some inconsistency.
- Prepare for consuming perf data as input directly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110729

Files:
  llvm/tools/llvm-profgen/PerfReader.cpp
  llvm/tools/llvm-profgen/PerfReader.h
  llvm/tools/llvm-profgen/llvm-profgen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110729.375929.patch
Type: text/x-patch
Size: 14468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210929/a3955fa2/attachment.bin>


More information about the llvm-commits mailing list