File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,12 @@ struct PseudoProbeDesc {
275
275
std::vector<Hex64> GUID;
276
276
std::vector<Hex64> Hash;
277
277
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
+ }
278
284
};
279
285
} // end namespace bolt
280
286
@@ -306,7 +312,8 @@ template <> struct MappingTraits<bolt::BinaryProfile> {
306
312
static void mapping (IO &YamlIO, bolt::BinaryProfile &BP) {
307
313
YamlIO.mapRequired (" header" , BP.Header );
308
314
YamlIO.mapRequired (" functions" , BP.Functions );
309
- YamlIO.mapOptional (" pseudo_probe_desc" , BP.PseudoProbeDesc );
315
+ YamlIO.mapOptional (" pseudo_probe_desc" , BP.PseudoProbeDesc ,
316
+ bolt::PseudoProbeDesc ());
310
317
}
311
318
};
312
319
Original file line number Diff line number Diff line change 36
36
## generated
37
37
# RUN: perf2bolt %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin -p %t.preagg --pa -w %t.yaml -o %t.fdata
38
38
# 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:
41
42
42
43
CHECK: Report of decoding input pseudo probe binaries
43
44
You can’t perform that action at this time.
0 commit comments