// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_PROFILER_MODULE_CACHE_H_ #define BASE_PROFILER_MODULE_CACHE_H_ #include <memory> #include <set> #include <string> #include <string_view> #include <vector> #include "base/base_export.h" #include "base/containers/flat_set.h" #include "base/files/file_path.h" #include "base/memory/raw_ptr.h" #include "build/build_config.h" #if BUILDFLAG(IS_WIN) #include "base/win/windows_types.h" #endif namespace base { // Converts module id to match the id that the Google-internal symbol server // expects. BASE_EXPORT std::string TransformModuleIDToSymbolServerFormat( std::string_view module_id); // Supports cached lookup of modules by address, with caching based on module // address ranges. // // Cached lookup is necessary on Mac for performance, due to an inefficient // dladdr implementation. See https://crrev.com/487092. // // Cached lookup is beneficial on Windows to minimize use of the loader // lock. Note however that the cache retains a handle to looked-up modules for // its lifetime, which may result in pinning modules in memory that were // transiently loaded by the OS. class BASE_EXPORT ModuleCache { … }; } // namespace base #endif // BASE_PROFILER_MODULE_CACHE_H_