diff --git a/bolt/include/bolt/Profile/ProfileYAMLMapping.h b/bolt/include/bolt/Profile/ProfileYAMLMapping.h index 91955afb186e..9865118f2696 100644 --- a/bolt/include/bolt/Profile/ProfileYAMLMapping.h +++ b/bolt/include/bolt/Profile/ProfileYAMLMapping.h @@ -270,12 +270,12 @@ template <> struct MappingTraits { }; namespace bolt { -struct PseudoProbeDesc { +struct ProfilePseudoProbeDesc { std::vector GUID; std::vector Hash; std::vector GUIDHashIdx; // Index of hash for that GUID in Hash - bool operator==(const PseudoProbeDesc &Other) const { + bool operator==(const ProfilePseudoProbeDesc &Other) const { // Only treat empty Desc as equal return GUID.empty() && Other.GUID.empty() && Hash.empty() && Other.Hash.empty() && GUIDHashIdx.empty() && @@ -284,8 +284,8 @@ struct PseudoProbeDesc { }; } // end namespace bolt -template <> struct MappingTraits { - static void mapping(IO &YamlIO, bolt::PseudoProbeDesc &PD) { +template <> struct MappingTraits { + static void mapping(IO &YamlIO, bolt::ProfilePseudoProbeDesc &PD) { YamlIO.mapRequired("gs", PD.GUID); YamlIO.mapRequired("gh", PD.GUIDHashIdx); YamlIO.mapRequired("hs", PD.Hash); @@ -295,7 +295,7 @@ template <> struct MappingTraits { } // end namespace llvm LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::BinaryFunctionProfile) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::PseudoProbeDesc) +LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::ProfilePseudoProbeDesc) namespace llvm { namespace yaml { @@ -304,7 +304,7 @@ namespace bolt { struct BinaryProfile { BinaryProfileHeader Header; std::vector Functions; - PseudoProbeDesc PseudoProbeDesc; + ProfilePseudoProbeDesc PseudoProbeDesc; }; } // namespace bolt @@ -313,7 +313,7 @@ template <> struct MappingTraits { YamlIO.mapRequired("header", BP.Header); YamlIO.mapRequired("functions", BP.Functions); YamlIO.mapOptional("pseudo_probe_desc", BP.PseudoProbeDesc, - bolt::PseudoProbeDesc()); + bolt::ProfilePseudoProbeDesc()); } }; diff --git a/bolt/include/bolt/Profile/YAMLProfileWriter.h b/bolt/include/bolt/Profile/YAMLProfileWriter.h index aec6e4748476..d4d7217464cc 100644 --- a/bolt/include/bolt/Profile/YAMLProfileWriter.h +++ b/bolt/include/bolt/Profile/YAMLProfileWriter.h @@ -47,7 +47,7 @@ public: convertBFInlineTree(const MCPseudoProbeDecoder &Decoder, const InlineTreeDesc &InlineTree, uint64_t GUID); - static std::tuple + static std::tuple convertPseudoProbeDesc(const MCPseudoProbeDecoder &PseudoProbeDecoder); static yaml::bolt::BinaryFunctionProfile diff --git a/bolt/lib/Profile/YAMLProfileWriter.cpp b/bolt/lib/Profile/YAMLProfileWriter.cpp index 44600c3c5d5e..4437be423ff4 100644 --- a/bolt/lib/Profile/YAMLProfileWriter.cpp +++ b/bolt/lib/Profile/YAMLProfileWriter.cpp @@ -81,9 +81,10 @@ YAMLProfileWriter::collectInlineTree( return InlineTree; } -std::tuple +std::tuple YAMLProfileWriter::convertPseudoProbeDesc(const MCPseudoProbeDecoder &Decoder) { - yaml::bolt::PseudoProbeDesc Desc; + yaml::bolt::ProfilePseudoProbeDesc Desc; InlineTreeDesc InlineTree; for (const MCDecodedPseudoProbeInlineTree &TopLev :