[PATCH] D110793: [llvm-porfgen] Allow perf data as input
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 29 17:53:28 PDT 2021
wlei accepted this revision.
wlei added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:867
+ // for ` perf script --show-mmap-events -i ...`
+ return Line.find("PERF_RECORD_MMAP2") != StringRef::npos;
+}
----------------
wenlei wrote:
> wlei wrote:
> > Before we use "TraceIt.getCurrentLine().startswith("PERF_RECORD_MMAP2"))" for the check, why here changed to `find`? it seems like our regex match only supports for leading "PERF_RECORD_MMAP2"
> This is because if we want to get mmap events only, we need to use `perf script --show-mmap-events -F comm,pid -i ...`. However with that, the mmap shows up in the following format. I have a comment above.
>
> > systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7ff989ee1000(0x7d000) @ 0 00:1c 4615 6072345749617000736]: r-xp /usr/lib64/libgcrypt.so.11.8.2
>
> The regex handles this today as it's not pinned to the beginning of the line (no `^`).
>
>
I see, thanks for the clarification.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110793/new/
https://reviews.llvm.org/D110793
More information about the llvm-commits
mailing list