[PATCH] D43511: [dsymutil] Be smarter in caching calls to realpath

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 07:21:59 PST 2018


JDevlieghere created this revision.
JDevlieghere added reviewers: aprantl, davide, friss.

Calling realpath is expensive but necessary to perform the uniqueing in dsymutil. Although we already cached the results for every individual file, we had reports of it taking 40 seconds of a 3.5 minute link. This patch replaces the current caching with an alternative that caches path prefixes.

For clang, this results in a reduction of 97.87%: from 7274 calls to realpath to only 155.


Repository:
  rL LLVM

https://reviews.llvm.org/D43511

Files:
  llvm/tools/dsymutil/DwarfLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43511.135054.patch
Type: text/x-patch
Size: 5083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180220/da40afb4/attachment.bin>


More information about the llvm-commits mailing list