From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>,
Stephane Eranian <eranian@google.com>,
Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy
Date: Fri, 26 Feb 2016 18:43:07 -0300 [thread overview]
Message-ID: <20160226214307.GX8720@kernel.org> (raw)
In-Reply-To: <1456512767-1164-4-git-send-email-namhyung@kernel.org>
Em Sat, Feb 27, 2016 at 03:52:46AM +0900, Namhyung Kim escreveu:
> When dynamic sort key is used it might not show pretty printed output.
> This is because the trace output was not set only for the first dynamic
> sort key. During hierarchy_insert_entry() it missed to pass the
> trace_output to dynamic entries. Also even if it did, only first entry
> will have it. Subsequent entries might set it during collapsing stage
> but it's not guaranteed.
>
> Before:
>
> $ perf report --hierarchy --stdio -s ptr,bytes_req,gfp_flags -g none
> #
> # Overhead ptr / bytes_req / gfp_flags
> # .............. ..........................................
> #
> 37.50% 0xffff8803f7669400
> 37.50% 448
> 37.50% 66080
> 10.42% 0xffff8803f766be00
> 8.33% 96
> 8.33% 66080
> 2.08% 512
> 2.08% 67280
>
> After:
>
> #
> # Overhead ptr / bytes_req / gfp_flags
> # .............. ..........................................
> #
> 37.50% 0xffff8803f7669400
> 37.50% 448
> 37.50% GFP_ATOMIC|GFP_NOWARN|GFP_NOMEMALLOC
So, I'm not getting this translation, it looks just like before. So I
tried the non-hierarchy mode and got this [FAILED TO PARSE] on each
line:
Samples: 107 of event 'kmem:kmalloc', Event count (approx.): 107
Overhead Trace output
33.64% [FAILED TO PARSE] call_site=0xffffffff811a0747 ptr=0xffff880109c54000 bytes_req=4096 bytes_alloc=4096 gfp_flags=37748928 ▒
Investigating...
> 10.42% 0xffff8803f766be00
> 8.33% 96
> 8.33% GFP_ATOMIC|GFP_NOWARN|GFP_NOMEMALLOC
> 2.08% 512
> 2.08% GFP_KERNEL|GFP_NOWARN|GFP_REPEAT|GFP
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/hist.c | 2 +-
> tools/perf/util/sort.c | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index cc849d326211..9b3f582867d6 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -1125,7 +1125,7 @@ static struct hist_entry *hierarchy_insert_entry(struct hists *hists,
> new->fmt = fmt;
>
> /* some fields are now passed to 'new' */
> - if (perf_hpp__is_trace_entry(fmt))
> + if (perf_hpp__is_trace_entry(fmt) || perf_hpp__is_dynamic_entry(fmt))
> he->trace_output = NULL;
> else
> new->trace_output = NULL;
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index e948fcac0939..3b1b4018f111 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -1767,6 +1767,9 @@ static int __sort__hde_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
> if (hde->raw_trace)
> goto raw_field;
>
> + if (!he->trace_output)
> + he->trace_output = get_trace_output(he);
> +
> field = hde->field;
> namelen = strlen(field->name);
> str = he->trace_output;
> --
> 2.7.1
next prev parent reply other threads:[~2016-02-26 21:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 18:52 [PATCH 1/5] perf report: Fix comparing of dynamic entries Namhyung Kim
2016-02-26 18:52 ` [PATCH 2/5] perf report: Fix indentation of dynamic entries in hierarchy Namhyung Kim
2016-02-27 9:43 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-26 18:52 ` [PATCH 3/5] perf report: Left align " Namhyung Kim
2016-02-27 9:43 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-26 18:52 ` [PATCH 4/5] perf report: Fix dynamic entry display " Namhyung Kim
2016-02-26 21:43 ` Arnaldo Carvalho de Melo [this message]
2016-02-26 21:45 ` Arnaldo Carvalho de Melo
2016-02-26 22:08 ` Arnaldo Carvalho de Melo
2016-02-26 22:24 ` Arnaldo Carvalho de Melo
2016-02-26 22:26 ` Steven Rostedt
2016-02-26 22:37 ` Arnaldo Carvalho de Melo
2016-02-26 23:12 ` Jiri Olsa
2016-02-26 23:13 ` Jiri Olsa
2016-02-26 23:13 ` [PATCH] tools lib traceevent: Add '~' operation within arg_num_eval() Steven Rostedt
2016-02-26 23:39 ` Arnaldo Carvalho de Melo
2016-02-26 23:45 ` David Ahern
2016-03-10 16:16 ` David Ahern
2016-03-10 19:28 ` Arnaldo Carvalho de Melo
2016-03-11 8:47 ` [tip:perf/core] " tip-bot for Steven Rostedt
2016-02-27 9:44 ` [tip:perf/core] perf hists: Fix dynamic entry display in hierarchy tip-bot for Namhyung Kim
2016-02-26 18:52 ` [PATCH 5/5] perf report: Update column width of dynamic entries Namhyung Kim
2016-02-26 22:43 ` Arnaldo Carvalho de Melo
2016-02-27 9:44 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-26 21:23 ` [PATCH 1/5] perf report: Fix comparing " Jiri Olsa
2016-02-27 9:43 ` [tip:perf/core] perf hists: " tip-bot for Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160226214307.GX8720@kernel.org \
--to=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox