lkml.org 
[lkml]   [2014]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] perf tools: enable LBR call stack support
On Thu, Nov 06, 2014 at 09:58:05AM -0500, kan.liang@intel.com wrote:

SNIP

> };
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 2f9e680..8c23607 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -537,13 +537,24 @@ int perf_evsel__group_desc(struct perf_evsel *evsel, char *buf, size_t size)
> }
>
> static void
> -perf_evsel__config_callgraph(struct perf_evsel *evsel)
> +perf_evsel__config_callgraph(struct perf_evsel *evsel,
> + struct record_opts *opts)
> {
> bool function = perf_evsel__is_function_event(evsel);
> struct perf_event_attr *attr = &evsel->attr;
>
> perf_evsel__set_sample_bit(evsel, CALLCHAIN);
>
> + if (callchain_param.record_mode == CALLCHAIN_LBR) {
> + if (!opts->branch_stack) {
> + perf_evsel__set_sample_bit(evsel, BRANCH_STACK);
> + attr->branch_sample_type = PERF_SAMPLE_BRANCH_USER |
> + PERF_SAMPLE_BRANCH_CALL_STACK;
> + attr->exclude_user = 0;

I think we shouldn't siletly change attr->exclude_user,
if it was defined, we need to display warning that
we are changing that or fail

jirka


\
 
 \ /
  Last update: 2014-11-12 09:21    [W:0.102 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site