[Lldb-commits] [lldb] 7ed3c2e - [lldb] Increase the maximum number of classes we can read from shared cache

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 26 15:01:05 PDT 2023


Author: Alex Langford
Date: 2023-06-26T14:59:55-07:00
New Revision: 7ed3c2edf017840e0c7c358aa48d2d67d4b55dcb

URL: https://github.com/llvm/llvm-project/commit/7ed3c2edf017840e0c7c358aa48d2d67d4b55dcb
DIFF: https://github.com/llvm/llvm-project/commit/7ed3c2edf017840e0c7c358aa48d2d67d4b55dcb.diff

LOG: [lldb] Increase the maximum number of classes we can read from shared cache

The shared cache has grown past the previously hardcoded limit. As a
temporary measure, I am increasing the hardcoded number of classes we
can expect to read from the shared cache. This is not a good long-term
solution.

Differential Revision: https://reviews.llvm.org/D153817

Added: 
    

Modified: 
    lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index fc9b4d27ccb66..ef54c2b5044b0 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -2308,7 +2308,10 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() {
 
   // The number of entries to pre-allocate room for.
   // Each entry is (addrsize + 4) bytes
-  const uint32_t max_num_classes = 163840;
+  // FIXME: It is not sustainable to continue incrementing this value every time
+  // the shared cache grows. This is because it requires allocating memory in
+  // the inferior process and some inferior processes have small memory limits.
+  const uint32_t max_num_classes = 212992;
 
   UtilityFunction *get_class_info_code = GetClassInfoUtilityFunction(exe_ctx);
   if (!get_class_info_code) {


        


More information about the lldb-commits mailing list