[llvm-branch-commits] [llvm] [MC][NFC] Statically allocate storage for decoded pseudo probes and function records (PR #102789)
Lei Wang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 13 23:40:07 PDT 2024
================
@@ -218,9 +220,7 @@ void PseudoProbeRewriter::updatePseudoProbes() {
}
while (CallOutputAddress != CallOutputAddresses.second) {
- AP.second.push_back(*Probe);
- AP.second.back().setAddress(CallOutputAddress->second);
- Probe->getInlineTreeNode()->addProbes(&(AP.second.back()));
+ ProbeDecoder.addInjectedProbe(*Probe, CallOutputAddress->second);
----------------
wlei-llvm wrote:
Why we need this change? seems it's not related to decoding pseudo probe, or is it because we allocate a fixed size of `MCDecodedPseudoProbe`, so later there is no way to add additional probe to the vector. To address this, we have to use a new container `InjectedProbeMap` to save new probes. If so, could you add comments to explain this(maybe in the definition of `InjectedProbeMap`)?
https://github.com/llvm/llvm-project/pull/102789
More information about the llvm-branch-commits
mailing list