From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751756AbbKCJEa (ORCPT ); Tue, 3 Nov 2015 04:04:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54718 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbbKCJES (ORCPT ); Tue, 3 Nov 2015 04:04:18 -0500 Date: Tue, 3 Nov 2015 10:04:14 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , Brendan Gregg , David Ahern , Frederic Weisbecker , Andi Kleen , Kan Liang Subject: Re: [PATCH v3 4/4] perf report: Add callchain value option Message-ID: <20151103090414.GB31745@krava.brq.redhat.com> References: <1446535111-31713-1-git-send-email-namhyung@kernel.org> <1446535111-31713-5-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446535111-31713-5-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 Tue, Nov 03, 2015 at 04:18:31PM +0900, Namhyung Kim wrote: > Now -g/--call-graph option supports how to display callchain values. > Possible values are 'percent', 'period' and 'count'. The percent is > same as before and it's the default behavior. The period displays the > raw period value rather than the percentage. The count displays the > number of occurrences. > > $ perf report --no-children --stdio -g percent > ... > 39.93% swapper [kernel.vmlinux] [k] intel_idel > | > ---intel_idle > cpuidle_enter_state > cpuidle_enter > call_cpuidle > cpu_startup_entry > | > |--28.63%-- start_secondary > | > --11.30%-- rest_init > > $ perf report --no-children --show-total-period --stdio -g period > ... > 39.93% 13018705 swapper [kernel.vmlinux] [k] intel_idel > | > ---intel_idle > cpuidle_enter_state > cpuidle_enter > call_cpuidle > cpu_startup_entry > | > |--9334403-- start_secondary > | > --3684302-- rest_init > > $ perf report --no-children --show-nr-samples --stdio -g count > ... > 39.93% 80 swapper [kernel.vmlinux] [k] intel_idel > | > ---intel_idle > cpuidle_enter_state > cpuidle_enter > call_cpuidle > cpu_startup_entry > | > |--57-- start_secondary > | > --23-- rest_init > > Cc: Brendan Gregg > Signed-off-by: Namhyung Kim > --- > tools/perf/Documentation/perf-report.txt | 13 ++++--- > tools/perf/builtin-report.c | 4 +-- > tools/perf/ui/stdio/hist.c | 10 +++++- > tools/perf/util/callchain.c | 60 +++++++++++++++++++++++++++----- > tools/perf/util/callchain.h | 10 +++++- > tools/perf/util/util.c | 3 +- > 6 files changed, 83 insertions(+), 17 deletions(-) > > diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt > index 5ce8da1e1256..bb9fd23a105e 100644 > --- a/tools/perf/Documentation/perf-report.txt > +++ b/tools/perf/Documentation/perf-report.txt > @@ -170,11 +170,11 @@ OPTIONS > Dump raw trace in ASCII. > > -g:: > ---call-graph=:: > +--call-graph=:: > Display call chains using type, min percent threshold, print limit, > - call order, sort key and branch. Note that ordering of parameters is not > - fixed so any parement can be given in an arbitraty order. One exception > - is the print_limit which should be preceded by threshold. > + call order, sort key, optional branch and value. Note that ordering of > + parameters is not fixed so any parement can be given in an arbitraty order. > + One exception is the print_limit which should be preceded by threshold. > > print_type can be either: > - flat: single column, linear exposure of call chains. > @@ -204,6 +204,11 @@ OPTIONS > - branch: include last branch information in callgraph when available. > Usually more convenient to use --branch-history for this. > > + value can be: > + - percent: diplay overhead percent (default) > + - period: display event period > + - count: display evnt count s/evnt/event/ ^^^^ jirka