Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481345
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/7] perf hists browser: Fix event group display |
| Date | 2016-09-12 16:30 +0200 |
| Message-ID | <sgApb-4s1-3@gated-at.bofh.it> (permalink) |
| References | <sgsUF-852-1@gated-at.bofh.it> <sgsUF-852-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Mon, Sep 12, 2016 at 03:19:52PM +0900, Namhyung Kim escreveu:
> Milian reported that the event group on TUI shows duplicated overhead.
> This was due to a bug on calculating hpp->buf position. The
> hpp_advance() was called from __hpp__slsmg_color_printf() on TUI but
> it's already called from the hpp__call_print_fn macro in __hpp__fmt().
> The end result is that the print function returns number of bytes it
> printed but the buffer advanced twice of the length.
>
> This is generally not a problem since it doesn't need to access the
> buffer again. But with event group, overhead needs to be printed
> multiple times and hist_entry__snprintf_alignment() tries to fill the
> space with buffer after it printed. So it (brokenly) showed the last
> overhead again.
>
> The bug was there from the beginning, but I think it's only revealed
> when the alignment function was added.
Thanks, applied.
Milian, if you could, please test this, I would then change the line
below to Reported-and-Tested-by: you, if I get it before my next pull
req to Ingo.
- Arnaldo
> Reported-by: Milian Wolff <milian.wolff@kdab.com>
> Fixes: 89fee7094323 ("perf hists: Do column alignment on the format iterator")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/ui/browsers/hists.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index f0611c937d4b..35e44b1879e3 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -1097,7 +1097,6 @@ static int __hpp__slsmg_color_printf(struct perf_hpp *hpp, const char *fmt, ...)
> ret = scnprintf(hpp->buf, hpp->size, fmt, len, percent);
> ui_browser__printf(arg->b, "%s", hpp->buf);
>
> - advance_hpp(hpp, ret);
> return ret;
> }
>
> --
> 2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHSET 0/7] perf tools: Support hierarchy report with event group (v1) Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
[PATCH 4/7] perf hist: Initialize hierachy tree explicitly Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
Re: [PATCH 4/7] perf hist: Initialize hierachy tree explicitly Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 16:30 +0200
Re: [PATCH 4/7] perf hist: Initialize hierachy tree explicitly Namhyung Kim <namhyung@kernel.org> - 2016-09-13 02:10 +0200
[PATCH 6/7] perf ui/tui: Reset output width for hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
Re: [PATCH 6/7] perf ui/tui: Reset output width for hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 16:30 +0200
Re: [PATCH 6/7] perf ui/tui: Reset output width for hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-13 03:10 +0200
[PATCH 3/7] perf hist: Introduce hists__link_hierarchy() Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
[PATCH 1/7] perf hists browser: Fix event group display Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
Re: [PATCH 1/7] perf hists browser: Fix event group display Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 16:30 +0200
[tip:perf/core] perf hists browser: Fix event group display tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-09-20 23:40 +0200
[PATCH 2/7] perf hist: Introduce hists__match_hierarchy() Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
Re: [PATCH 2/7] perf hist: Introduce hists__match_hierarchy() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 16:30 +0200
Re: [PATCH 2/7] perf hist: Introduce hists__match_hierarchy() Namhyung Kim <namhyung@kernel.org> - 2016-09-13 02:10 +0200
[PATCH 7/7] perf report: Enable group view with hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
Re: [PATCH 7/7] perf report: Enable group view with hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 16:30 +0200
Re: [PATCH 7/7] perf report: Enable group view with hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-13 03:10 +0200
[PATCH 5/7] perf ui/stdio: Reset output width for hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-12 08:30 +0200
Re: [PATCH 5/7] perf ui/stdio: Reset output width for hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 16:30 +0200
Re: [PATCH 5/7] perf ui/stdio: Reset output width for hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-13 03:10 +0200
csiph-web