================ @@ -58,8 +60,164 @@ const BinaryFunction *YAMLProfileWriter::setCSIDestination( return nullptr; } +std::vector<YAMLProfileWriter::InlineTreeNode> +YAMLProfileWriter::getInlineTree(const MCPseudoProbeDecoder &Decoder, + const MCDecodedPseudoProbeInlineTree *Root) { + auto getHash = [&](const MCDecodedPseudoProbeInlineTree &Node) { + return Decoder.getFuncDescForGUID(Node.Guid)->FuncHash; + }; + assert(Root); + std::vector<InlineTreeNode> InlineTree; + InlineTreeNode Node{Root, Root->Guid, getHash(*Root), 0, 0}; + InlineTree.emplace_back(Node); ---------------- wlei-llvm wrote:
nit: InlineTree.emplace_back(Root, Root->Guid, ...), same to the one below https://github.com/llvm/llvm-project/pull/107137 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits