[Lldb-commits] [PATCH] D51176: Restrict the set of plugins used for ProcessMinidump

Leonard Mosescu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 23 10:58:51 PDT 2018


lemo created this revision.
lemo added reviewers: clayborg, zturner.
lemo added a project: LLDB.
Herald added a subscriber: abidh.

1. The dynamic loaders should not be needed for loading minidumps and they may create problems (ex. the macOS loader resets the list of loaded modules)
2. In general, the extra plugins can do extraneous work which hurts performance (ex. trying to set up implicit breakpoints, which in turn will trigger extra symbol loading)


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51176

Files:
  source/Plugins/Process/minidump/ProcessMinidump.cpp
  source/Plugins/Process/minidump/ProcessMinidump.h


Index: source/Plugins/Process/minidump/ProcessMinidump.h
===================================================================
--- source/Plugins/Process/minidump/ProcessMinidump.h
+++ source/Plugins/Process/minidump/ProcessMinidump.h
@@ -55,7 +55,7 @@
 
   Status DoLoadCore() override;
 
-  DynamicLoader *GetDynamicLoader() override;
+  DynamicLoader *GetDynamicLoader() override { return nullptr; }
 
   ConstString GetPluginName() override;
 
@@ -102,6 +102,8 @@
 
   void ReadModuleList();
 
+  JITLoaderList &GetJITLoaders() override;
+
 private:
   FileSpec m_core_file;
   llvm::ArrayRef<MinidumpThread> m_thread_list;
Index: source/Plugins/Process/minidump/ProcessMinidump.cpp
===================================================================
--- source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -16,7 +16,7 @@
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Section.h"
-#include "lldb/Target/DynamicLoader.h"
+#include "lldb/Target/JITLoaderList.h"
 #include "lldb/Target/MemoryRegionInfo.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/Target.h"
@@ -201,12 +201,6 @@
   return error;
 }
 
-DynamicLoader *ProcessMinidump::GetDynamicLoader() {
-  if (m_dyld_ap.get() == nullptr)
-    m_dyld_ap.reset(DynamicLoader::FindPlugin(this, nullptr));
-  return m_dyld_ap.get();
-}
-
 ConstString ProcessMinidump::GetPluginName() { return GetPluginNameStatic(); }
 
 uint32_t ProcessMinidump::GetPluginVersion() { return 1; }
@@ -401,3 +395,10 @@
   }
   return true;
 }
+
+JITLoaderList &ProcessMinidump::GetJITLoaders() {
+  if (!m_jit_loaders_ap) {
+    m_jit_loaders_ap = llvm::make_unique<JITLoaderList>();
+  }
+  return *m_jit_loaders_ap;
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51176.162234.patch
Type: text/x-patch
Size: 1779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180823/2073c8b5/attachment.bin>


More information about the lldb-commits mailing list