[PATCH] D119784: [Symbolize] LRU cache binaries in llvm-symbolizer.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 08:40:36 PST 2022


dblaikie added a comment.

Thanks for summarizing the differences. Be nice if we could do this once/figure out a general implementation that covers both scenarios, but I'm not sure how practical that is.

Do you have some performance numbers? What if we didn't cache/had a cache size of 0? (does the caching logic buy us enough performance to justify it)



================
Comment at: llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h:228
+      Evictor();
+  };
+
----------------



================
Comment at: llvm/lib/DebugInfo/Symbolize/Symbolize.cpp:542
+    CachedBinary &CachedBin = Pair.first->second;
+    CachedBin = CachedBinary(std::move(BinOrErr.get()));
+    CachedBin.pushEvictor([this, I = Pair.first]() { BinaryForPath.erase(I); });
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119784



More information about the llvm-commits mailing list