Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517151 > unrolled thread
| Started by | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| First post | 2016-11-08 14:10 +0100 |
| Last post | 2016-11-09 14:20 +0100 |
| Articles | 13 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-11-08 14:10 +0100
[PATCH 4/4] perf hists: Fix column length on --hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-11-08 14:20 +0100
[PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-11-08 14:20 +0100
Re: [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-09 15:30 +0100
Re: [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-09 15:30 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-11-08 14:30 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-09 14:20 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-11-09 14:20 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-11-08 14:50 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-11-08 16:10 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-11-08 16:20 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-11-09 14:20 +0100
Re: [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-09 14:20 +0100
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-11-08 14:10 +0100 |
| Subject | [PATCH 0/4] perf tools: Assorted fixes for hierarchy mode |
| Message-ID | <sBek2-1kJ-21@gated-at.bofh.it> |
Hello, This patches fix problems in hierarchy output Markus reported some time ago. The code is available on the 'perf/hierarchy-fix-v1' branch in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any feedbacks are welcomed. Thanks, Namhyung Cc: Markus Trippelsdorf <markus@trippelsdorf.de> Namhyung Kim (4): perf hist browser: Fix indentation of folded sign on --hierarchy perf hist browser: Show folded sign properly on --hierarchy perf hist browser: Fix column indentation on --hierarchy perf hists: Fix column length on --hierarchy tools/perf/ui/browsers/hists.c | 35 ++++++++++++++++++++++++----------- tools/perf/util/hist.c | 12 ++++++------ 2 files changed, 30 insertions(+), 17 deletions(-) -- 2.10.1
[toc] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-11-08 14:20 +0100 |
| Subject | [PATCH 4/4] perf hists: Fix column length on --hierarchy |
| Message-ID | <sBetH-1nU-3@gated-at.bofh.it> |
| In reply to | #1517151 |
Markus reported that there's a weird behavior on perf top --hierarch
regarding the column length. Looking at the code, I found a debious
code which affects the symtoms. When --hierarchy option is used, the
last column length might be inaccurate since it skips to update the
length on leaf entries. I cannot remember why it did and looks like a
leftover from previous version during the development. Anyway updating
the column length often is not harmful. So let's move the code out.
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/hist.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index e1be4132054d..6770a9645609 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1601,18 +1601,18 @@ static void hists__hierarchy_output_resort(struct hists *hists,
if (prog)
ui_progress__update(prog, 1);
+ hists->nr_entries++;
+ if (!he->filtered) {
+ hists->nr_non_filtered_entries++;
+ hists__calc_col_len(hists, he);
+ }
+
if (!he->leaf) {
hists__hierarchy_output_resort(hists, prog,
&he->hroot_in,
&he->hroot_out,
min_callchain_hits,
use_callchain);
- hists->nr_entries++;
- if (!he->filtered) {
- hists->nr_non_filtered_entries++;
- hists__calc_col_len(hists, he);
- }
-
continue;
}
--
2.10.1
[toc] | [prev] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-11-08 14:20 +0100 |
| Subject | [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy |
| Message-ID | <sBetH-1nU-13@gated-at.bofh.it> |
| In reply to | #1517151 |
When horizontall scrolling is used in hierarchy mode, the folded signed
disappears at the right most column.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/ui/browsers/hists.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index fe5677ccbc22..7722ad311318 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1381,8 +1381,14 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser,
}
perf_hpp_list__for_each_format(entry->hpp_list, fmt) {
- ui_browser__write_nstring(&browser->b, "", 2);
- width -= 2;
+ if (first) {
+ ui_browser__printf(&browser->b, "%c ", folded_sign);
+ width -= 2;
+ first = false;
+ } else {
+ ui_browser__write_nstring(&browser->b, "", 2);
+ width -= 2;
+ }
/*
* No need to call hist_entry__snprintf_alignment()
--
2.10.1
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-11-09 15:30 +0100 |
| Subject | Re: [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy |
| Message-ID | <sBC30-8sr-13@gated-at.bofh.it> |
| In reply to | #1517156 |
Em Tue, Nov 08, 2016 at 10:08:31PM +0900, Namhyung Kim escreveu:
> When horizontall scrolling is used in hierarchy mode, the folded signed
> disappears at the right most column.
Humm, this indeed shows the '+' folded signal after pressing ->, but it
moves from the first to the third column :-\
- Arnaldo
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/ui/browsers/hists.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index fe5677ccbc22..7722ad311318 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -1381,8 +1381,14 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser,
> }
>
> perf_hpp_list__for_each_format(entry->hpp_list, fmt) {
> - ui_browser__write_nstring(&browser->b, "", 2);
> - width -= 2;
> + if (first) {
> + ui_browser__printf(&browser->b, "%c ", folded_sign);
> + width -= 2;
> + first = false;
> + } else {
> + ui_browser__write_nstring(&browser->b, "", 2);
> + width -= 2;
> + }
>
> /*
> * No need to call hist_entry__snprintf_alignment()
> --
> 2.10.1
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-11-09 15:30 +0100 |
| Subject | Re: [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy |
| Message-ID | <sBC30-8sr-15@gated-at.bofh.it> |
| In reply to | #1518202 |
Em Wed, Nov 09, 2016 at 11:28:11AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Nov 08, 2016 at 10:08:31PM +0900, Namhyung Kim escreveu:
> > When horizontall scrolling is used in hierarchy mode, the folded signed
> > disappears at the right most column.
>
> Humm, this indeed shows the '+' folded signal after pressing ->, but it
> moves from the first to the third column :-\
>
> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -1381,8 +1381,14 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser,
> > }
> >
> > perf_hpp_list__for_each_format(entry->hpp_list, fmt) {
> > - ui_browser__write_nstring(&browser->b, "", 2);
> > - width -= 2;
Also why move this invariant to both branches?
> > + if (first) {
> > + ui_browser__printf(&browser->b, "%c ", folded_sign);
> > + width -= 2;
> > + first = false;
> > + } else {
> > + ui_browser__write_nstring(&browser->b, "", 2);
> > + width -= 2;
> > + }
> >
> > /*
> > * No need to call hist_entry__snprintf_alignment()
> > --
> > 2.10.1
[toc] | [prev] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2016-11-08 14:30 +0100 |
| Message-ID | <sBeDo-1rd-15@gated-at.bofh.it> |
| In reply to | #1517151 |
On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > Hello, > > This patches fix problems in hierarchy output Markus reported some > time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > in my tree: > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > Any feedbacks are welcomed. It looks perfect now. Many thanks for your fixes. -- Markus
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-11-09 14:20 +0100 |
| Message-ID | <sBAXg-7ME-21@gated-at.bofh.it> |
| In reply to | #1517166 |
Em Tue, Nov 08, 2016 at 02:21:17PM +0100, Markus Trippelsdorf escreveu: > On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > > Hello, > > > > This patches fix problems in hierarchy output Markus reported some > > time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > > in my tree: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > > > Any feedbacks are welcomed. > > It looks perfect now. Many thanks for your fixes. Ok, I'll take that as a Tested-by: Markus, ok? - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2016-11-09 14:20 +0100 |
| Message-ID | <sBAXg-7ME-19@gated-at.bofh.it> |
| In reply to | #1518135 |
On 2016.11.09 at 10:11 -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Nov 08, 2016 at 02:21:17PM +0100, Markus Trippelsdorf escreveu: > > On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > > > Hello, > > > > > > This patches fix problems in hierarchy output Markus reported some > > > time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > > > in my tree: > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > > > > > Any feedbacks are welcomed. > > > > It looks perfect now. Many thanks for your fixes. > > Ok, I'll take that as a Tested-by: Markus, ok? Sure, feel free. Thanks. -- Markus
[toc] | [prev] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2016-11-08 14:50 +0100 |
| Message-ID | <sBeWK-1y1-7@gated-at.bofh.it> |
| In reply to | #1517151 |
On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > > This patches fix problems in hierarchy output Markus reported some > time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > in my tree: > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > Any feedbacks are welcomed. By the way, I hope that: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=perf/core&id=8a06b0be6507f97f3aa92ca814335b8b65fd3de2 doesn't fall through the cracks. -- Markus
[toc] | [prev] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-11-08 16:10 +0100 |
| Message-ID | <sBgc9-2wv-29@gated-at.bofh.it> |
| In reply to | #1517196 |
Hello, On Tue, Nov 8, 2016 at 10:43 PM, Markus Trippelsdorf <markus@trippelsdorf.de> wrote: > On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: >> >> This patches fix problems in hierarchy output Markus reported some >> time ago. The code is available on the 'perf/hierarchy-fix-v1' branch >> in my tree: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git >> >> Any feedbacks are welcomed. > > By the way, I hope that: > https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=perf/core&id=8a06b0be6507f97f3aa92ca814335b8b65fd3de2 > doesn't fall through the cracks. What do you mean? It's already in the tip/perf/core so will be merged to the mainline eventually. Thanks, Namhyung
[toc] | [prev] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2016-11-08 16:20 +0100 |
| Message-ID | <sBglQ-2zG-33@gated-at.bofh.it> |
| In reply to | #1517274 |
On 2016.11.09 at 00:05 +0900, Namhyung Kim wrote: > Hello, > > On Tue, Nov 8, 2016 at 10:43 PM, Markus Trippelsdorf > <markus@trippelsdorf.de> wrote: > > On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > >> > >> This patches fix problems in hierarchy output Markus reported some > >> time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > >> in my tree: > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > >> > >> Any feedbacks are welcomed. > > > > By the way, I hope that: > > https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=perf/core&id=8a06b0be6507f97f3aa92ca814335b8b65fd3de2 > > doesn't fall through the cracks. > > What do you mean? It's already in the tip/perf/core so will be merged > to the mainline eventually. Ok. I was just wondering, because it sits there for two weeks already... -- Markus
[toc] | [prev] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2016-11-09 14:20 +0100 |
| Message-ID | <sBAXf-7ME-1@gated-at.bofh.it> |
| In reply to | #1517286 |
On 2016.11.09 at 10:10 -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Nov 08, 2016 at 04:10:23PM +0100, Markus Trippelsdorf escreveu: > > On 2016.11.09 at 00:05 +0900, Namhyung Kim wrote: > > > On Tue, Nov 8, 2016 at 10:43 PM, Markus Trippelsdorf > > > <markus@trippelsdorf.de> wrote: > > > > On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > > > >> This patches fix problems in hierarchy output Markus reported some > > > >> time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > > > >> in my tree: > > > > >> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > > > >> Any feedbacks are welcomed. > > > > > By the way, I hope that: > > > > https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=perf/core&id=8a06b0be6507f97f3aa92ca814335b8b65fd3de2 > > > > doesn't fall through the cracks. > > > > What do you mean? It's already in the tip/perf/core so will be merged > > > to the mainline eventually. > > > Ok. I was just wondering, because it sits there for two weeks already... > > If you think something qualifies for perf/urgent, i.e. to go to a kernel > that is in -rc stage, v4.9-rc4 now, for instance, please point that out > and I'll consider it. Because "perf top --hierarchy" is new in 4.9, I think all fixes for that feature qualify for perf/urgent by default. -- Markus
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-11-09 14:20 +0100 |
| Message-ID | <sBAXf-7ME-3@gated-at.bofh.it> |
| In reply to | #1517286 |
Em Tue, Nov 08, 2016 at 04:10:23PM +0100, Markus Trippelsdorf escreveu: > On 2016.11.09 at 00:05 +0900, Namhyung Kim wrote: > > On Tue, Nov 8, 2016 at 10:43 PM, Markus Trippelsdorf > > <markus@trippelsdorf.de> wrote: > > > On 2016.11.08 at 22:08 +0900, Namhyung Kim wrote: > > >> This patches fix problems in hierarchy output Markus reported some > > >> time ago. The code is available on the 'perf/hierarchy-fix-v1' branch > > >> in my tree: > > >> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > >> Any feedbacks are welcomed. > > > By the way, I hope that: > > > https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=perf/core&id=8a06b0be6507f97f3aa92ca814335b8b65fd3de2 > > > doesn't fall through the cracks. > > What do you mean? It's already in the tip/perf/core so will be merged > > to the mainline eventually. > Ok. I was just wondering, because it sits there for two weeks already... If you think something qualifies for perf/urgent, i.e. to go to a kernel that is in -rc stage, v4.9-rc4 now, for instance, please point that out and I'll consider it. - Arnaldo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web