diff options
author | Greg Clayton <gclayton@apple.com> | 2013-06-12 00:46:38 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-06-12 00:46:38 +0000 |
commit | d8cf1a119d4c38e59ade90018a4df015dff63383 (patch) | |
tree | 606b745e59a29f527781d29bd8709ff5e8a814f1 /lldb/tools/debugserver/source/MacOSX/MachThread.h | |
parent | ec36f9a73429dda07049473625d3354b209cc5b7 (diff) | |
download | bcm5719-llvm-d8cf1a119d4c38e59ade90018a4df015dff63383.tar.gz bcm5719-llvm-d8cf1a119d4c38e59ade90018a4df015dff63383.zip |
Huge performance improvements when one breakpoint contains many locations.
325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote.
That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly.
Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed.
llvm-svn: 183820
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachThread.h')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachThread.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachThread.h b/lldb/tools/debugserver/source/MacOSX/MachThread.h index c6d7b312769..bf96e68bc6c 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThread.h +++ b/lldb/tools/debugserver/source/MacOSX/MachThread.h @@ -62,7 +62,7 @@ public: bool SetPC(uint64_t value); // Set program counter uint64_t GetSP(uint64_t failValue = INVALID_NUB_ADDRESS); // Get stack pointer - nub_break_t CurrentBreakpoint(); + DNBBreakpoint * CurrentBreakpoint(); uint32_t EnableHardwareBreakpoint (const DNBBreakpoint *breakpoint); uint32_t EnableHardwareWatchpoint (const DNBBreakpoint *watchpoint); bool DisableHardwareBreakpoint (const DNBBreakpoint *breakpoint); @@ -125,7 +125,6 @@ protected: uint32_t m_seq_id; // A Sequential ID that increments with each new thread nub_state_t m_state; // The state of our process PThreadMutex m_state_mutex; // Multithreaded protection for m_state - nub_break_t m_break_id; // Breakpoint that this thread is (stopped)/was(running) at (NULL for none) struct thread_basic_info m_basic_info; // Basic information for a thread used to see if a thread is valid int32_t m_suspend_count; // The current suspend count > 0 means we have suspended m_suspendCount times, // < 0 means we have resumed it m_suspendCount times. |