Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1300800

Re: [PATCH 06/13] perf tools: Try to show pretty printed output for dynamic sort keys

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 06/13] perf tools: Try to show pretty printed output for dynamic sort keys
Date 2016-01-04 16:20 +0100
Message-ID <qNf5n-59c-1@gated-at.bofh.it> (permalink)
References <qIyBH-6Kl-3@gated-at.bofh.it> <qIyBI-6Kl-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Wed, Dec 23, 2015 at 02:07:03AM +0900, Namhyung Kim escreveu:
> Each tracepoint event has format string for print to improve
> readability.  Try to parse the output and match the field name.  If it
> finds one, use that for the result.  If not, fallbacks to the original
> output.
> 
> For example, sort on kmem:kmalloc.gfp_flags looks like below:
> (Note: libtraceevent plugins are not installed on my system.  They might
> affect the output below)
> 
> Before:
>   # Overhead  Command   gfp_flags
>   # ........  .......  ..........
>   #
>       99.89%  perf          32848
>        0.06%  sleep           208
>        0.03%  perf          32976
>        0.01%  perf            208
> 
> After:
>   # Overhead  Command            gfp_flags
>   # ........  .......  ...................
>   #
>       99.89%  perf       GFP_NOFS|GFP_ZERO
>        0.06%  sleep             GFP_KERNEL
>        0.03%  perf     GFP_KERNEL|GFP_ZERO
>        0.01%  perf              GFP_KERNEL
> 
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/util/hist.c |   1 +
>  tools/perf/util/sort.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++---
>  tools/perf/util/sort.h |   1 +
>  3 files changed, 102 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index c0c92a3daa69..ef1a4a5cc610 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -978,6 +978,7 @@ void hist_entry__delete(struct hist_entry *he)
>  	if (he->srcfile && he->srcfile[0])
>  		free(he->srcfile);
>  	free_callchain(he->callchain);
> +	free(he->trace_output);
>  	free(he);
>  }

This clashed with an updated patch earlier in this this patchkit
("[PATCH v4.1 02/13] perf hist: Save raw_data/size for tracepoint events"),
fixing it.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 06/13] perf tools: Try to show pretty printed output for  dynamic sort keys Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-04 16:20 +0100

csiph-web