mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 19:07:53 +08:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user