[PATCH] D134822: [PERF2BOLT] Do not issue parsing error on weird build ids
Rafael Auler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 12:21:40 PDT 2022
rafauler created this revision.
rafauler added a reviewer: bolt.
Herald added a subscriber: ayermolo.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
rafauler requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
In weird entries we were issueing a parse error. For example, in line 5 here:
6862acc063b0aa86595f52ff81628577df4296ff a.so
6862acc063b0aa86595f52ff81628577df4296ff a.so
6862acc063b0aa86595f52ff81628577df4296ff a.so
db758cb3c970044e78d5a4c99b011708a9995636 bin1
60326683eab31acfd03435d9ed4ff9a8 bin2
7d448e51851b4bdb33eac84f90e74628a14a5f00 b.so
742aa26e0211794356cc25f415c25230a26aa045 c.so
Fix that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134822
Files:
bolt/lib/Profile/DataAggregator.cpp
Index: bolt/lib/Profile/DataAggregator.cpp
===================================================================
--- bolt/lib/Profile/DataAggregator.cpp
+++ bolt/lib/Profile/DataAggregator.cpp
@@ -2147,7 +2147,8 @@
// If one of the strings is missing, don't issue a parsing error, but still
// do not return a value.
- if (ParsingBuf[0] == '\n')
+ consumeAllRemainingFS();
+ if (checkAndConsumeNewLine())
return NoneType();
ErrorOr<StringRef> NameStr = parseString(FieldSeparator, true);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134822.463647.patch
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220928/466667d9/attachment.bin>
More information about the llvm-commits
mailing list