[PATCH] D111577: [llvm-profgen] Ignore stack samples before aggregation
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 17:04:18 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGab5d65e6858b: [llvm-profgen] Ignore stack samples before aggregation (authored by wlei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111577/new/
https://reviews.llvm.org/D111577
Files:
llvm/tools/llvm-profgen/PerfReader.cpp
Index: llvm/tools/llvm-profgen/PerfReader.cpp
===================================================================
--- llvm/tools/llvm-profgen/PerfReader.cpp
+++ llvm/tools/llvm-profgen/PerfReader.cpp
@@ -647,9 +647,13 @@
if (!TraceIt.isAtEoF() && TraceIt.getCurrentLine().startswith(" 0x")) {
// Parsing LBR stack and populate into PerfSample.LBRStack
if (extractLBRStack(TraceIt, Sample->LBRStack)) {
- // Canonicalize stack leaf to avoid 'random' IP from leaf frame skew LBR
- // ranges
- Sample->CallStack.front() = Sample->LBRStack[0].Target;
+ if (IgnoreStackSamples) {
+ Sample->CallStack.clear();
+ } else {
+ // Canonicalize stack leaf to avoid 'random' IP from leaf frame skew LBR
+ // ranges
+ Sample->CallStack.front() = Sample->LBRStack[0].Target;
+ }
// Record samples by aggregation
AggregatedSamples[Hashable<PerfSample>(Sample)] += Count;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111577.379556.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211014/ff159d7b/attachment.bin>
More information about the llvm-commits
mailing list