================ @@ -443,17 +446,24 @@ bool MCPseudoProbeDecoder::buildAddress2ProbeMap( // If the incoming node is null, all its children nodes should be disgarded. if (Cur) { // Switch/add to a new tree node(inlinee) - Cur = Cur->getOrAddNode(std::make_tuple(Guid, Index)); - Cur->Guid = Guid; + Cur->Children[CurChild] = MCDecodedPseudoProbeInlineTree(Guid, Index, Cur); + Cur = &Cur->Children[CurChild]; if (IsTopLevelFunc && !EncodingIsAddrBased) { if (auto V = FuncStartAddrs.lookup(Guid)) LastAddr = V; } } + // Advance CurChild for non-skipped top-level functions and unconditionally + // for inlined functions. + if (IsTopLevelFunc) + CurChild += !!Cur; ---------------- aaupov wrote:
It was initially this way, but I had to change to advancing CurChildIndex from within buildAddress2ProbeMap. The problem is if GuidFilter is in place, we will only allocate enough top-level entries for filtered functions. Therefore we can't advance CurChildIndex from top-level buildAddress2ProbeMap invocation (GUID is not yet parsed). We can advance non-top level child index though. Let me refactor this a bit so it's easier to follow. https://github.com/llvm/llvm-project/pull/102789 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits