================ @@ -587,6 +590,51 @@ size_t YAMLProfileReader::matchWithCallGraph(BinaryContext &BC) { return MatchedWithCallGraph; } +void YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees( + const MCPseudoProbeDecoder &Decoder, + const yaml::bolt::PseudoProbeDesc &YamlPD, + const std::vector<yaml::bolt::InlineTreeNode> &YamlInlineTree, + llvm::function_ref<const MCDecodedPseudoProbeInlineTree *(uint64_t)> + GetRootCallback) { + + // Match inline tree nodes by GUID, checksum, parent, and call site. + uint32_t ParentId = 0; + uint32_t PrevGUIDIdx = 0; + uint32_t Index = 0; + for (const yaml::bolt::InlineTreeNode &InlineTreeNode : YamlInlineTree) { + uint64_t GUIDIdx = InlineTreeNode.GUIDIndex; + if (GUIDIdx) + PrevGUIDIdx = GUIDIdx; + else + GUIDIdx = PrevGUIDIdx; + assert(GUIDIdx < YamlPD.GUID.size()); ---------------- wlei-llvm wrote:
nit: add assertion msg https://github.com/llvm/llvm-project/pull/99891 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits