[PATCH] D120430: [memprof] Symbolize and cache stack frames.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 17:47:47 PST 2022


tejohnson added a comment.
Herald added a project: All.

What is the memory impact of caching? Hopefully not too onerous since this is a big speedup!



================
Comment at: llvm/include/llvm/ProfileData/RawMemProfReader.h:81
+    // initialized properly.
+    if (Error E = symbolizeStackFrames())
+      report_fatal_error(std::move(E));
----------------
I take it initialize() not get called in this case? Maybe add a comment.


================
Comment at: llvm/lib/ProfileData/RawMemProfReader.cpp:355
   for (const uint64_t Address : CallStack) {
-    Expected<DIInliningInfo> DIOr = Symbolizer->symbolizeInlinedCode(
-        getModuleOffset(Address), Specifier, /*UseSymbolTable=*/false);
----------------
davidxl wrote:
> Using a map from addr to Frames for caching can also avoid redundant symbolization computation. Is there an advantage of doing eager symbolization?
I suspect because it makes it easier for adding additional records, such as identifying interior call stack nodes within their functions (we need to mark these with metadata as well).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120430/new/

https://reviews.llvm.org/D120430



More information about the llvm-commits mailing list