aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-04-11 17:39:37 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-11 21:18:23 -0400
commit01e0d50c3f95cb1bae2dbfd83173bc2864d6d28c (patch)
tree13997baf2cc2cb50f766f28b7df756f5e48582e0 /tools/perf
parent22c8a376b55f327f7a25a318e87ba9202ba284bf (diff)
perf evsel: Rename config_callgraph() to config_callchain() and make it public
The rename is for consistency with the parameter name. Make it public for fine grained control of which evsels should have callchains enabled, like, for instance, will be done in the next changesets in 'perf trace', to enable callchains just on the "raw_syscalls:sys_exit" tracepoint. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-og8vup111rn357g4yagus3ao@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/evsel.c11
-rw-r--r--tools/perf/util/evsel.h3
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 84252729222d..d475a4ec8b57 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -562,10 +562,9 @@ int perf_evsel__group_desc(struct perf_evsel *evsel, char *buf, size_t size)
562 return ret; 562 return ret;
563} 563}
564 564
565static void 565void perf_evsel__config_callchain(struct perf_evsel *evsel,
566perf_evsel__config_callgraph(struct perf_evsel *evsel, 566 struct record_opts *opts,
567 struct record_opts *opts, 567 struct callchain_param *param)
568 struct callchain_param *param)
569{ 568{
570 bool function = perf_evsel__is_function_event(evsel); 569 bool function = perf_evsel__is_function_event(evsel);
571 struct perf_event_attr *attr = &evsel->attr; 570 struct perf_event_attr *attr = &evsel->attr;
@@ -705,7 +704,7 @@ static void apply_config_terms(struct perf_evsel *evsel,
705 704
706 /* set perf-event callgraph */ 705 /* set perf-event callgraph */
707 if (param.enabled) 706 if (param.enabled)
708 perf_evsel__config_callgraph(evsel, opts, &param); 707 perf_evsel__config_callchain(evsel, opts, &param);
709 } 708 }
710} 709}
711 710
@@ -814,7 +813,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
814 evsel->attr.exclude_callchain_user = 1; 813 evsel->attr.exclude_callchain_user = 1;
815 814
816 if (callchain && callchain->enabled && !evsel->no_aux_samples) 815 if (callchain && callchain->enabled && !evsel->no_aux_samples)
817 perf_evsel__config_callgraph(evsel, opts, callchain); 816 perf_evsel__config_callchain(evsel, opts, callchain);
818 817
819 if (opts->sample_intr_regs) { 818 if (opts->sample_intr_regs) {
820 attr->sample_regs_intr = opts->sample_intr_regs; 819 attr->sample_regs_intr = opts->sample_intr_regs;
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 7e45d2130a0f..1bd6c2e02dfa 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -183,6 +183,9 @@ struct callchain_param;
183void perf_evsel__config(struct perf_evsel *evsel, 183void perf_evsel__config(struct perf_evsel *evsel,
184 struct record_opts *opts, 184 struct record_opts *opts,
185 struct callchain_param *callchain); 185 struct callchain_param *callchain);
186void perf_evsel__config_callchain(struct perf_evsel *evsel,
187 struct record_opts *opts,
188 struct callchain_param *callchain);
186 189
187int __perf_evsel__sample_size(u64 sample_type); 190int __perf_evsel__sample_size(u64 sample_type);
188void perf_evsel__calc_id_pos(struct perf_evsel *evsel); 191void perf_evsel__calc_id_pos(struct perf_evsel *evsel);