[PATCH] D108153: [llvm-profgen] Support LBR only perf script

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 23 10:14:28 PDT 2021


wlei added a comment.

> If these are considered actual profile (as the name `show-raw-profile` suggests), it's probably better to write to output file instead of dumping to stdout. How about just have a switch `skip-symbolization`, which writes the raw, unsymbolized profile to output file directly, and then skip all later processing.

Sounds good to write to the output file, I indeed found the raw profile outputs are mixed with other warning logs which is inconvenient for other tools to use the raw profile. Changed!

> The range representation between cs and non-cs profile is slightly different, perhaps they can also be unified.

Can we use a separate patch(will come soon) for the unified format?  just for easy review(there should be several tests to be fixed).



================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:695
+        std::make_shared<StringBasedCtxKey>();
+    Key->Context = "empty";
+    Key->genHashCode();
----------------
wenlei wrote:
> Would an empty string (zero length) work? 
Good, catch! Removed!


================
Comment at: llvm/tools/llvm-profgen/llvm-profgen.cpp:94
+  if (Reader->getPerfScriptType() == PERF_LBR)
+    return EXIT_SUCCESS;
+
----------------
wenlei wrote:
> As an intermediate state, print a warning?
Sounds good


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108153/new/

https://reviews.llvm.org/D108153



More information about the llvm-commits mailing list