summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/StackFrameList.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-06-12 16:25:24 +0000
committerPavel Labath <labath@google.com>2017-06-12 16:25:24 +0000
commit7f1c12118f4f69c528a12f8371478d9a0bbf7022 (patch)
tree06a64d1136710647b7818378b23d6c059613ba38 /lldb/source/Target/StackFrameList.cpp
parent0c69d6e9bbb8f833daf75297a8b7fab724b33bc1 (diff)
downloadbcm5719-llvm-7f1c12118f4f69c528a12f8371478d9a0bbf7022.tar.gz
bcm5719-llvm-7f1c12118f4f69c528a12f8371478d9a0bbf7022.zip
Introduce new command: thread backtrace unique
This patch introduces a new thread backtrace command "unique". The command is based off of "thread backtrace all" but will instead find all threads which share matching call stacks and de-duplicate their output, listing call stack and all the threads which share it. This is especially useful for apps which use thread/task pools sitting around waiting for work and cause excessive duplicate output. I needed this behavior recently when debugging a core with 700+ threads. Differential Revision: https://reviews.llvm.org/D33426 Reviewers: clayborg, jingham Patch by Brian Gianforcaro <b.gianfo@gmail.com> llvm-svn: 305197
Diffstat (limited to 'lldb/source/Target/StackFrameList.cpp')
-rw-r--r--lldb/source/Target/StackFrameList.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp
index 044f860ba32..be7fa800121 100644
--- a/lldb/source/Target/StackFrameList.cpp
+++ b/lldb/source/Target/StackFrameList.cpp
@@ -802,6 +802,7 @@ StackFrameList::GetStackFrameSPForStackFramePtr(StackFrame *stack_frame_ptr) {
size_t StackFrameList::GetStatus(Stream &strm, uint32_t first_frame,
uint32_t num_frames, bool show_frame_info,
uint32_t num_frames_with_source,
+ bool show_unique,
const char *selected_frame_marker) {
size_t num_frames_displayed = 0;
@@ -842,7 +843,7 @@ size_t StackFrameList::GetStatus(Stream &strm, uint32_t first_frame,
if (!frame_sp->GetStatus(strm, show_frame_info,
num_frames_with_source > (first_frame - frame_idx),
- marker))
+ show_unique, marker))
break;
++num_frames_displayed;
}
OpenPOWER on IntegriCloud