[PATCH] D131449: [llvm-profgen] Fix perf script parsing issues
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 15:52:27 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1b212d1098d2: [llvm-profgen] Fix perf script parsing issues (authored by wlei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131449/new/
https://reviews.llvm.org/D131449
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
@@ -367,12 +367,13 @@
}
std::string PerfPath = *PerfExecutable;
std::string PerfTraceFile = PerfData.str() + ".script.tmp";
+ std::string ErrorFile = PerfData.str() + ".script.err.tmp";
StringRef ScriptMMapArgs[] = {PerfPath, "script", "--show-mmap-events",
"-F", "comm,pid", "-i",
PerfData};
- Optional<StringRef> Redirects[] = {llvm::None, // Stdin
- StringRef(PerfTraceFile), // Stdout
- StringRef(PerfTraceFile)}; // Stderr
+ Optional<StringRef> Redirects[] = {llvm::None, // Stdin
+ StringRef(PerfTraceFile), // Stdout
+ StringRef(ErrorFile)}; // Stderr
sys::ExecuteAndWait(PerfPath, ScriptMMapArgs, llvm::None, Redirects);
// Collect the PIDs
@@ -950,8 +951,8 @@
SmallVector<StringRef, 6> Fields;
bool R = RegMmap2.match(Line, &Fields);
if (!R) {
- std::string ErrorMsg = "Cannot parse mmap event: " + Line.str() + " \n";
- exitWithError(ErrorMsg);
+ std::string WarningMsg = "Cannot parse mmap event: " + Line.str() + " \n";
+ WithColor::warning() << WarningMsg;
}
Fields[PID].getAsInteger(10, MMap.PID);
Fields[MMAPPED_ADDRESS].getAsInteger(0, MMap.Address);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131449.450983.patch
Type: text/x-patch
Size: 1569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220808/fe62971c/attachment.bin>
More information about the llvm-commits
mailing list