summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SharedCacheView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/sharedcache/core/SharedCacheView.cpp')
-rw-r--r--view/sharedcache/core/SharedCacheView.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp
index d07d8614..a3e494e2 100644
--- a/view/sharedcache/core/SharedCacheView.cpp
+++ b/view/sharedcache/core/SharedCacheView.cpp
@@ -842,6 +842,19 @@ bool SharedCacheView::Init()
auto cacheController = SharedCacheController::Initialize(*this, std::move(sharedCache));
+ {
+ // Load up all the symbols into the named symbols lookup map.
+ // NOTE: We do this on a separate thread as image & region loading does not consult this.
+ WorkerPriorityEnqueue([logger, cacheController]() {
+ auto& sharedCache = cacheController->GetCache();
+ auto startTime = std::chrono::high_resolution_clock::now();
+ sharedCache.ProcessSymbols();
+ auto endTime = std::chrono::high_resolution_clock::now();
+ std::chrono::duration<double> elapsed = endTime - startTime;
+ logger->LogInfo("Processing %zu symbols took %.3f seconds (separate thread)", sharedCache.GetSymbols().size(), elapsed.count());
+ });
+ }
+
// Users can adjust which images are loaded by default using the `loader.dsc.autoLoadPattern` setting.
std::string autoLoadPattern = ".*libsystem_c.dylib";
if (settings && settings->Contains("loader.dsc.autoLoadPattern"))