[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200319202517.23423-10-kan.liang@linux.intel.com>
Date: Thu, 19 Mar 2020 13:25:09 -0700
From: kan.liang@...ux.intel.com
To: acme@...nel.org, jolsa@...hat.com, peterz@...radead.org,
mingo@...hat.com, linux-kernel@...r.kernel.org
Cc: namhyung@...nel.org, adrian.hunter@...el.com,
mathieu.poirier@...aro.org, ravi.bangoria@...ux.ibm.com,
alexey.budankov@...ux.intel.com, vitaly.slobodskoy@...el.com,
pavel.gerasimov@...el.com, mpe@...erman.id.au, eranian@...gle.com,
ak@...ux.intel.com, Kan Liang <kan.liang@...ux.intel.com>
Subject: [PATCH V4 09/17] perf thread: Add a knob for LBR stitch approach
From: Kan Liang <kan.liang@...ux.intel.com>
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 full proof. 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.
Reviewed-by: Andi Kleen <ak@...ux.intel.com>
Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
---
tools/perf/util/thread.c | 1 +
tools/perf/util/thread.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 28b719388028..1f080db23615 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -47,6 +47,7 @@ struct thread *thread__new(pid_t pid, pid_t tid)
thread->tid = tid;
thread->ppid = -1;
thread->cpu = -1;
+ thread->lbr_stitch_enable = false;
INIT_LIST_HEAD(&thread->namespaces_list);
INIT_LIST_HEAD(&thread->comm_list);
init_rwsem(&thread->namespaces_lock);
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 20b96b5d1f15..95294050cff2 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -46,6 +46,9 @@ struct thread {
struct srccode_state srccode_state;
bool filter;
int filter_entry_depth;
+
+ /* LBR call stack stitch */
+ bool lbr_stitch_enable;
};
struct machine;
--
2.17.1
Powered by blists - more mailing lists