Re: [PATCH v3 4/4] perf report: Add callchain value option

From: Jiri Olsa
Date: Tue Nov 03 2015 - 04:04:34 EST


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 <brendan.d.gregg@xxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> ---
> 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=<print_type,threshold[,print_limit],order,sort_key,branch>::
> +--call-graph=<print_type,threshold[,print_limit],order,sort_key[,branch],value>::
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/