File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -444,7 +444,11 @@ Error RawMemProfReader::setupForSymbolization() {
444
444
ProfiledTextSegmentEnd = Entry.End ;
445
445
}
446
446
}
447
- assert (NumMatched != 0 && " No matching executable segments in segment info." );
447
+ if (NumMatched == 0 )
448
+ return make_error<StringError>(
449
+ Twine (" No matching executable segments found in binary " ) +
450
+ Binary.getBinary ()->getFileName (),
451
+ inconvertibleErrorCode ());
448
452
assert ((PreferredTextSegmentAddress == 0 ||
449
453
(PreferredTextSegmentAddress == ProfiledTextSegmentStart)) &&
450
454
" Expect text segment address to be 0 or equal to profiled text "
Original file line number Diff line number Diff line change @@ -14,3 +14,11 @@ CHECK: Build ID: [[ID:[[:xdigit:]]+]]
14
14
15
15
COM: Then match it with the profdata output.
16
16
CHECK-COUNT-1: BuildId: {{.*}}[[ID]]
17
+
18
+ Test that profile build id does not match build id in the binary
19
+ RUN: not llvm-profdata show --memory %p/Inputs/buildid.memprofraw --profiled-binary %p/Inputs/basic.memprofexe -o - 2>&1 | FileCheck %s -check-prefix=BUILDID-NOT-MATCH
20
+
21
+ Test error message when profile build id does not match build id in a different binary.
22
+ RUN: not llvm-profdata merge %p/Inputs/buildid.memprofraw %p/Inputs/basic.memprofraw --profiled-binary %p/Inputs/basic.memprofexe -o %t4.prof 2>&1 | FileCheck %s -check-prefix=BUILDID-NOT-MATCH
23
+
24
+ BUILDID-NOT-MATCH: No matching executable segments found in binary
You can’t perform that action at this time.
0 commit comments