Skip to content

Commit ee214d5

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.4 [skip ci]
2 parents 205c79c + 01e5684 commit ee214d5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

bolt/include/bolt/Profile/ProfileYAMLMapping.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ struct PseudoProbeDesc {
275275
std::vector<Hex64> GUID;
276276
std::vector<Hex64> Hash;
277277
std::vector<uint32_t> GUIDHash; // Index of hash for that GUID in Hash
278+
279+
bool operator==(const PseudoProbeDesc &Other) const {
280+
// Only treat empty Desc as equal
281+
return GUID.empty() && Other.GUID.empty() && Hash.empty() &&
282+
Other.Hash.empty() && GUIDHash.empty() && Other.GUIDHash.empty();
283+
}
278284
};
279285
} // end namespace bolt
280286

@@ -306,7 +312,8 @@ template <> struct MappingTraits<bolt::BinaryProfile> {
306312
static void mapping(IO &YamlIO, bolt::BinaryProfile &BP) {
307313
YamlIO.mapRequired("header", BP.Header);
308314
YamlIO.mapRequired("functions", BP.Functions);
309-
YamlIO.mapOptional("pseudo_probe_desc", BP.PseudoProbeDesc);
315+
YamlIO.mapOptional("pseudo_probe_desc", BP.PseudoProbeDesc,
316+
bolt::PseudoProbeDesc());
310317
}
311318
};
312319

bolt/test/X86/pseudoprobe-decoding-inline.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
## generated
3737
# RUN: perf2bolt %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin -p %t.preagg --pa -w %t.yaml -o %t.fdata
3838
# RUN: FileCheck --input-file %t.yaml %s --check-prefix CHECK-NO-OPT
39-
# CHECK-NO-OPT-NOT: pseudo_probes
40-
# CHECK-NO-OPT-NOT: inline_tree
39+
# CHECK-NO-OPT-NOT: probes:
40+
# CHECK-NO-OPT-NOT: inline_tree:
41+
# CHECK-NO-OPT-NOT: pseudo_probe_desc:
4142

4243
CHECK: Report of decoding input pseudo probe binaries
4344

0 commit comments

Comments
 (0)