aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-04-18 10:54:31 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-18 11:26:25 -0400
commit1cc83815d5fdb40a7d06c3f9871134a10e5ffa79 (patch)
tree4f54b5fb83f93ef971b73082dc3b1c6ab37b1912 /tools
parent30234f0925c1deeb472b579b57a9f50791157c58 (diff)
perf report: Use callchain_param.enabled instead of tool specific knob
We have callchain_param.enabled, so no need to have something just for 'perf report' to do the same thing. 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-wbeisubpualwogwi5u8utnt1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-report.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 160ea23b45aa..1d5be0bd426f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -47,7 +47,6 @@ struct report {
47 struct perf_tool tool; 47 struct perf_tool tool;
48 struct perf_session *session; 48 struct perf_session *session;
49 bool use_tui, use_gtk, use_stdio; 49 bool use_tui, use_gtk, use_stdio;
50 bool dont_use_callchains;
51 bool show_full_info; 50 bool show_full_info;
52 bool show_threads; 51 bool show_threads;
53 bool inverted_callchain; 52 bool inverted_callchain;
@@ -247,7 +246,7 @@ static int report__setup_sample_type(struct report *rep)
247 "you call 'perf record' without -g?\n"); 246 "you call 'perf record' without -g?\n");
248 return -1; 247 return -1;
249 } 248 }
250 } else if (!rep->dont_use_callchains && 249 } else if (!callchain_param.enabled &&
251 callchain_param.mode != CHAIN_NONE && 250 callchain_param.mode != CHAIN_NONE &&
252 !symbol_conf.use_callchain) { 251 !symbol_conf.use_callchain) {
253 symbol_conf.use_callchain = true; 252 symbol_conf.use_callchain = true;
@@ -599,13 +598,15 @@ static int __cmd_report(struct report *rep)
599static int 598static int
600report_parse_callchain_opt(const struct option *opt, const char *arg, int unset) 599report_parse_callchain_opt(const struct option *opt, const char *arg, int unset)
601{ 600{
602 struct report *rep = (struct report *)opt->value; 601 struct callchain_param *callchain = opt->value;
603 602
603 callchain->enabled = !unset;
604 /* 604 /*
605 * --no-call-graph 605 * --no-call-graph
606 */ 606 */
607 if (unset) { 607 if (unset) {
608 rep->dont_use_callchains = true; 608 symbol_conf.use_callchain = false;
609 callchain->mode = CHAIN_NONE;
609 return 0; 610 return 0;
610 } 611 }
611 612
@@ -734,7 +735,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
734 "regex filter to identify parent, see: '--sort parent'"), 735 "regex filter to identify parent, see: '--sort parent'"),
735 OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other, 736 OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other,
736 "Only display entries with parent-match"), 737 "Only display entries with parent-match"),
737 OPT_CALLBACK_DEFAULT('g', "call-graph", &report, 738 OPT_CALLBACK_DEFAULT('g', "call-graph", &callchain_param,
738 "print_type,threshold[,print_limit],order,sort_key[,branch],value", 739 "print_type,threshold[,print_limit],order,sort_key[,branch],value",
739 report_callchain_help, &report_parse_callchain_opt, 740 report_callchain_help, &report_parse_callchain_opt,
740 callchain_default_opt), 741 callchain_default_opt),