[PATCH] D43896: [XRay] cache symbolized function names for a repeatedly queried function ID

Martin Pelikán via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 18:00:32 PST 2018


pelikan marked an inline comment as done.
pelikan added inline comments.


================
Comment at: tools/llvm-xray/func-id-helper.h:31
   const FunctionAddressMap &FunctionAddresses;
+  mutable std::unordered_map<int32_t, std::string> CachedNames;
 
----------------
dberris wrote:
> Can you use an `llvm::DenseMap` instead of the standard (poorly performing) one instead?
I actually tested the speed difference with std::map only, and used unordered_map just like FunctionAddressMap does above.  I'm happy to change it though.


Repository:
  rL LLVM

https://reviews.llvm.org/D43896





More information about the llvm-commits mailing list