[llvm] [llvm-profgen] Support creating profiles of arbitrary events (PR #99026)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 23:48:28 PDT 2024
================
@@ -575,14 +591,54 @@ bool PerfScriptReader::extractLBRStack(TraceStream &TraceIt,
// Skip the leading instruction pointer.
size_t Index = 0;
+
+ StringRef EventName;
+ // Skip a perf event name. This may or may not exist.
+ if (Records.size() > Index && Records[Index].ends_with(":")) {
+ EventName = Records[Index].ltrim().rtrim(':');
----------------
WenleiHe wrote:
Based on the format in `cmov_3.perfscript`, event name should be extracted from `extractCallstack`, rather than `extractLBRStack`?
https://github.com/llvm/llvm-project/pull/99026
More information about the llvm-commits
mailing list