Skip to content

Commit 771fd15

Browse files
Kan Liangacmel
authored andcommitted
perf thread: Add a knob for LBR stitch approach
The LBR stitch approach should be disabled by default. Because - The stitching approach base on LBR call stack technology. The known limitations of LBR call stack technology still apply to the approach, e.g. Exception handing such as setjmp/longjmp will have calls/returns not match. - This approach is not foolproof. There can be cases where it creates incorrect call stacks from incorrect matches. There is no attempt to validate any matches in another way. The 'lbr_stitch_enable' is used to indicate whether enable LBR stitch approach, which is disabled by default. The following patch will introduce a new option for each tools to enable the LBR stitch approach. Signed-off-by: Kan Liang <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexey Budankov <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Pavel Gerasimov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Vitaly Slobodskoy <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent e2b2348 commit 771fd15

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tools/perf/util/thread.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct thread *thread__new(pid_t pid, pid_t tid)
4747
thread->tid = tid;
4848
thread->ppid = -1;
4949
thread->cpu = -1;
50+
thread->lbr_stitch_enable = false;
5051
INIT_LIST_HEAD(&thread->namespaces_list);
5152
INIT_LIST_HEAD(&thread->comm_list);
5253
init_rwsem(&thread->namespaces_lock);

tools/perf/util/thread.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ struct thread {
4646
struct srccode_state srccode_state;
4747
bool filter;
4848
int filter_entry_depth;
49+
50+
/* LBR call stack stitch */
51+
bool lbr_stitch_enable;
4952
};
5053

5154
struct machine;

0 commit comments

Comments
 (0)