[Lldb-commits] [lldb] r340578 - Restrict the set of plugins used for ProcessMinidump
Leonard Mosescu via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 23 14:34:33 PDT 2018
Author: lemo
Date: Thu Aug 23 14:34:33 2018
New Revision: 340578
URL: http://llvm.org/viewvc/llvm-project?rev=340578&view=rev
Log:
Restrict the set of plugins used for ProcessMinidump
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 sections, which for minidumps are already set up during minidump loading)
2. In general, the extra plugins can do extraneous work which hurts performance
(ex. trying to set up implicit symbolic breakpoints, which in turn will trigger
extra debug information loading)
Differential Revision: https://reviews.llvm.org/D51176
Modified:
lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h
Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp?rev=340578&r1=340577&r2=340578&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp Thu Aug 23 14:34:33 2018
@@ -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 @@ Status ProcessMinidump::DoLoadCore() {
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,14 @@ bool ProcessMinidump::GetProcessInfo(Pro
}
return true;
}
+
+// For minidumps there's no runtime generated code so we don't need JITLoader(s)
+// Avoiding them will also speed up minidump loading since JITLoaders normally
+// try to set up symbolic breakpoints, which in turn may force loading more
+// debug information than needed.
+JITLoaderList &ProcessMinidump::GetJITLoaders() {
+ if (!m_jit_loaders_ap) {
+ m_jit_loaders_ap = llvm::make_unique<JITLoaderList>();
+ }
+ return *m_jit_loaders_ap;
+}
Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h?rev=340578&r1=340577&r2=340578&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h Thu Aug 23 14:34:33 2018
@@ -55,7 +55,7 @@ public:
Status DoLoadCore() override;
- DynamicLoader *GetDynamicLoader() override;
+ DynamicLoader *GetDynamicLoader() override { return nullptr; }
ConstString GetPluginName() override;
@@ -102,6 +102,8 @@ protected:
void ReadModuleList();
+ JITLoaderList &GetJITLoaders() override;
+
private:
FileSpec m_core_file;
llvm::ArrayRef<MinidumpThread> m_thread_list;
More information about the lldb-commits
mailing list