[PATCH] D48501: [dsymutil] Introduce a new CachedBinaryHolder
Frederic Riss via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 27 15:33:37 PDT 2018
friss added a comment.
Why not transition completely to the new implementation and remove the old code in one step?
Should we have a limited number of files that we keep open? Some systems might run with a low number of allowed open files per-process.
This code is supposed to handle a lot of weird cases, can you make sure that all of this still works:
- fat object files
- thin archive containing fat object-files
- fat archive containing thin objectfiles
(I think the current code handles all of them, but I might be wrong. Please double-check)
================
Comment at: llvm/tools/dsymutil/BinaryHolder.cpp:254-259
+void CachedBinaryHolder::clear() {
+ std::lock_guard<std::mutex> ArchiveLock(ArchiveCacheMutex);
+ std::lock_guard<std::mutex> ObjectLock(ObjectCacheMutex);
+ ArchiveCache.clear();
+ ObjectCache.clear();
+}
----------------
Do we need a clear() method as this object basically never dies?
https://reviews.llvm.org/D48501
More information about the llvm-commits
mailing list