From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756115AbcBIWhV (ORCPT ); Tue, 9 Feb 2016 17:37:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756057AbcBIWhS (ORCPT ); Tue, 9 Feb 2016 17:37:18 -0500 Date: Tue, 9 Feb 2016 23:37:10 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Stephane Eranian , Wang Nan Subject: Re: [PATCH 23/23] perf top: Add --hierarchy option Message-ID: <20160209223710.GB3030@krava.redhat.com> References: <1454677315-7515-1-git-send-email-namhyung@kernel.org> <1454677315-7515-24-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454677315-7515-24-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2016 at 10:01:55PM +0900, Namhyung Kim wrote: > Support hierarchy output for perf-top using --hierarchy option. > > Acked-by: Pekka Enberg > Signed-off-by: Namhyung Kim > --- > tools/perf/Documentation/perf-top.txt | 3 +++ > tools/perf/builtin-top.c | 15 +++++++++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt > index b0e60e17db38..19f046f027cd 100644 > --- a/tools/perf/Documentation/perf-top.txt > +++ b/tools/perf/Documentation/perf-top.txt > @@ -233,6 +233,9 @@ Default is to monitor all CPUS. > --raw-trace:: > When displaying traceevent output, do not use print fmt or plugins. > > +--hierarchy:: > + Enable hierarchy output. > + > INTERACTIVE PROMPTING KEYS > -------------------------- > > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c > index a75de3940b97..b86b623e8799 100644 > --- a/tools/perf/builtin-top.c > +++ b/tools/perf/builtin-top.c > @@ -1214,6 +1214,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) > parse_branch_stack), > OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace, > "Show raw trace event output (do not use print fmt or plugins)"), > + OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy, > + "Show entries in a hierarchy"), > OPT_END() > }; > const char * const top_usage[] = { > @@ -1241,6 +1243,19 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) > goto out_delete_evlist; > } > > + if (symbol_conf.report_hierarchy) { > + /* disable incompatible options */ > + symbol_conf.event_group = false; > + symbol_conf.cumulate_callchain = false; > + > + if (field_order) { > + pr_err("Error: --hierarchy and --fields options cannot be used together\n"); > + parse_options_usage(top_usage, options, "fields", 0); > + parse_options_usage(NULL, options, "hierarchy", 0); > + goto out_delete_evlist; > + } > + } I was wondering about this when I was going through the patchset ;-) jirka