[PATCH] D115841: [llvm-profgen] Warn for empty LBR of hybrid sample instead of error
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 15 19:33:40 PST 2021
wlei created this revision.
Herald added subscribers: hoy, wenlei.
wlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115841
Files:
llvm/tools/llvm-profgen/PerfReader.cpp
llvm/tools/llvm-profgen/PerfReader.h
Index: llvm/tools/llvm-profgen/PerfReader.h
===================================================================
--- llvm/tools/llvm-profgen/PerfReader.h
+++ llvm/tools/llvm-profgen/PerfReader.h
@@ -580,6 +580,7 @@
uint64_t NumTotalSample = 0;
uint64_t NumLeafExternalFrame = 0;
uint64_t NumLeadingOutgoingLBR = 0;
+ uint64_t NumEmptyLBRSample = 0;
};
// Read perf script to parse the events and samples.
Index: llvm/tools/llvm-profgen/PerfReader.cpp
===================================================================
--- llvm/tools/llvm-profgen/PerfReader.cpp
+++ llvm/tools/llvm-profgen/PerfReader.cpp
@@ -748,7 +748,7 @@
}
} else {
// LBR sample is encoded in single line after stack sample
- exitWithError("'Hybrid perf sample is corrupted, No LBR sample line");
+ NumEmptyLBRSample++;
}
}
@@ -1204,6 +1204,8 @@
// Parse perf traces and do aggregation.
parseAndAggregateTrace();
+ emitWarningSummary(NumEmptyLBRSample, NumTotalSample,
+ "of hybrid samples have call stack sample but no LBR sample");
emitWarningSummary(NumLeafExternalFrame, NumTotalSample,
"of samples have leaf external frame in call stack.");
emitWarningSummary(NumLeadingOutgoingLBR, NumTotalSample,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115841.394726.patch
Type: text/x-patch
Size: 1270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/a05e9110/attachment.bin>
More information about the llvm-commits
mailing list