aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2024-09-24 16:18:48 -0700
committerGitHub <noreply@github.com>2024-09-24 16:18:48 -0700
commit02d6aad5cc940f17904c1288dfabc3fd2d439279 (patch)
treece4c3851312bb2a90b425a758590786e6e8e9614 /lldb/source/Commands/CommandObjectFrame.cpp
parent4a9da96dc68d878893399210888a03117b39b802 (diff)
downloadllvm-02d6aad5cc940f17904c1288dfabc3fd2d439279.zip
llvm-02d6aad5cc940f17904c1288dfabc3fd2d439279.tar.gz
llvm-02d6aad5cc940f17904c1288dfabc3fd2d439279.tar.bz2
[MemProf] Reduce unnecessary context id computation (NFC) (#109857)
One of the memory reduction techniques was to compute node context ids on the fly. This reduced memory at the expense of some compile time increase. For a large binary we were spending a lot of time invoking getContextIds on the node during assignStackNodesPostOrder, because we were iterating through the stack ids for a call from leaf to root (first to last node in the parlance used in that code). However, all calls for a given entry in the StackIdToMatchingCalls map share the same last node, so we can borrow the approach used by similar code in updateStackNodes and compute the context ids on the last node once, then iterate each call's stack ids in reverse order while reusing the last node's context ids. This reduced the thin link time by 43% for a large target. It isn't clear why there wasn't a similar increase measured when introducing the node context id recomputation, but the compile time was longer to start with then.
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
0 files changed, 0 insertions, 0 deletions