Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1487069 > unrolled thread
| Started by | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| First post | 2016-09-20 07:40 +0200 |
| Last post | 2016-09-20 23:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] perf ui/tui: Reset output width for hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-09-20 07:40 +0200
Re: [PATCH 1/3] perf ui/tui: Reset output width for hierarchy Jiri Olsa <jolsa@redhat.com> - 2016-09-20 09:10 +0200
[tip:perf/core] perf ui/tui: Reset output width for hierarchy tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-09-20 23:50 +0200
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-09-20 07:40 +0200 |
| Subject | [PATCH 1/3] perf ui/tui: Reset output width for hierarchy |
| Message-ID | <sjlWG-7hg-13@gated-at.bofh.it> |
When --hierarchy option is used, each entry has its own hpp_list to show
the result. But it missed to update width of each column.
Before:
- 46.29% 48.12% netctl-auto
+ 31.44% 29.25% [kernel.vmlinux]
+ 8.52% 11.55% libc-2.22.so
+ 5.19% 6.91% bash
+ 10.75% 11.83% wpa_cli
+ 8.25% 2.23% swapper
+ 6.45% 5.40% tr
+ 4.81% 8.09% awk
+ 4.15% 2.85% firefox
+ 3.86% 2.53% sh
After:
- 46.29% 48.12% netctl-auto
+ 31.44% 29.25% [kernel.vmlinux]
+ 8.52% 11.55% libc-2.22.so
+ 5.19% 6.91% bash
+ 10.75% 11.83% wpa_cli
+ 8.25% 2.23% swapper
+ 6.45% 5.40% tr
+ 4.81% 8.09% awk
+ 4.15% 2.85% firefox
+ 3.86% 2.53% sh
Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/ui/browsers/hists.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 35e44b1879e3..49db16334814 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2067,6 +2067,7 @@ void hist_browser__init(struct hist_browser *browser,
struct hists *hists)
{
struct perf_hpp_fmt *fmt;
+ struct perf_hpp_list_node *node;
browser->hists = hists;
browser->b.refresh = hist_browser__refresh;
@@ -2079,6 +2080,11 @@ void hist_browser__init(struct hist_browser *browser,
perf_hpp__reset_width(fmt, hists);
++browser->b.columns;
}
+ /* hierarchy entries have their own hpp list */
+ list_for_each_entry(node, &hists->hpp_formats, list) {
+ perf_hpp_list__for_each_format(&node->hpp, fmt)
+ perf_hpp__reset_width(fmt, hists);
+ }
}
struct hist_browser *hist_browser__new(struct hists *hists)
--
2.9.3
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-09-20 09:10 +0200 |
| Message-ID | <sjnlM-8eo-19@gated-at.bofh.it> |
| In reply to | #1487069 |
On Tue, Sep 20, 2016 at 02:30:23PM +0900, Namhyung Kim wrote:
> When --hierarchy option is used, each entry has its own hpp_list to show
> the result. But it missed to update width of each column.
>
> Before:
>
> - 46.29% 48.12% netctl-auto
> + 31.44% 29.25% [kernel.vmlinux]
> + 8.52% 11.55% libc-2.22.so
> + 5.19% 6.91% bash
> + 10.75% 11.83% wpa_cli
> + 8.25% 2.23% swapper
> + 6.45% 5.40% tr
> + 4.81% 8.09% awk
> + 4.15% 2.85% firefox
> + 3.86% 2.53% sh
>
> After:
>
> - 46.29% 48.12% netctl-auto
> + 31.44% 29.25% [kernel.vmlinux]
> + 8.52% 11.55% libc-2.22.so
> + 5.19% 6.91% bash
> + 10.75% 11.83% wpa_cli
> + 8.25% 2.23% swapper
> + 6.45% 5.40% tr
> + 4.81% 8.09% awk
> + 4.15% 2.85% firefox
> + 3.86% 2.53% sh
>
> Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
> ---
> tools/perf/ui/browsers/hists.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index 35e44b1879e3..49db16334814 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -2067,6 +2067,7 @@ void hist_browser__init(struct hist_browser *browser,
> struct hists *hists)
> {
> struct perf_hpp_fmt *fmt;
> + struct perf_hpp_list_node *node;
>
> browser->hists = hists;
> browser->b.refresh = hist_browser__refresh;
> @@ -2079,6 +2080,11 @@ void hist_browser__init(struct hist_browser *browser,
> perf_hpp__reset_width(fmt, hists);
> ++browser->b.columns;
> }
> + /* hierarchy entries have their own hpp list */
> + list_for_each_entry(node, &hists->hpp_formats, list) {
> + perf_hpp_list__for_each_format(&node->hpp, fmt)
> + perf_hpp__reset_width(fmt, hists);
> + }
> }
>
> struct hist_browser *hist_browser__new(struct hists *hists)
> --
> 2.9.3
>
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Namhyung Kim <tipbot@zytor.com> |
|---|---|
| Date | 2016-09-20 23:50 +0200 |
| Subject | [tip:perf/core] perf ui/tui: Reset output width for hierarchy |
| Message-ID | <sjB5n-8g-25@gated-at.bofh.it> |
| In reply to | #1487069 |
Commit-ID: 5ff3e7a224d40f9dd73625b91377787034a8b35e
Gitweb: http://git.kernel.org/tip/5ff3e7a224d40f9dd73625b91377787034a8b35e
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 20 Sep 2016 14:30:23 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 20 Sep 2016 16:08:30 -0300
perf ui/tui: Reset output width for hierarchy
When --hierarchy option is used, each entry has its own hpp_list to show
the result. But it missed to update width of each column.
Before:
- 46.29% 48.12% netctl-auto
+ 31.44% 29.25% [kernel.vmlinux]
+ 8.52% 11.55% libc-2.22.so
+ 5.19% 6.91% bash
+ 10.75% 11.83% wpa_cli
+ 8.25% 2.23% swapper
+ 6.45% 5.40% tr
+ 4.81% 8.09% awk
+ 4.15% 2.85% firefox
+ 3.86% 2.53% sh
After:
- 46.29% 48.12% netctl-auto
+ 31.44% 29.25% [kernel.vmlinux]
+ 8.52% 11.55% libc-2.22.so
+ 5.19% 6.91% bash
+ 10.75% 11.83% wpa_cli
+ 8.25% 2.23% swapper
+ 6.45% 5.40% tr
+ 4.81% 8.09% awk
+ 4.15% 2.85% firefox
+ 3.86% 2.53% sh
Committer note:
Full testing instructions:
1) Record with an event group:
$ perf record -e '{cycles,instructions}' make -j4
2) Use report in hierarchy mode, to get a few expanded trees on
the same screen, use --percent-limit:
$ perf report --hierarchy --percent-limit 0.5
Samples: 103K of event 'anon group { cycles:u, instructions:u }',
Event count (approx.): 57317631725
Overhead Command / Shared Object / Symbol ◆
- 58.89% 55.12% cc1 ▒
- 50.26% 48.10% cc1 ▒
3.61% 5.13% [.] _cpp_lex_token ▒
2.58% 0.78% [.] ht_lookup_with_hash ▒
1.31% 1.30% [.] ggc_internal_alloc ▒
1.08% 2.25% [.] get_combined_adhoc_loc ▒
1.01% 1.95% [.] ira_init ▒
0.96% 1.78% [.] linemap_position_for_column ▒
0.65% 1.01% [.] cpp_get_token_with_location ▒
- 7.52% 6.58% libc-2.23.so ▒
1.70% 1.78% [.] _int_malloc ▒
0.69% 0.75% [.] _int_free ▒
0.67% 0.42% [.] malloc_consolidate ▒
- 0.58% 0.42% ld-2.23.so ▒
no entry >= 0.50% ▒
- 0.52% 0.03% [kernel.vmlinux] ▒
no entry >= 0.50% ▒
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode")
Link: http://lkml.kernel.org/r/20160920053025.13989-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/browsers/hists.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 35e44b1..49db163 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2067,6 +2067,7 @@ void hist_browser__init(struct hist_browser *browser,
struct hists *hists)
{
struct perf_hpp_fmt *fmt;
+ struct perf_hpp_list_node *node;
browser->hists = hists;
browser->b.refresh = hist_browser__refresh;
@@ -2079,6 +2080,11 @@ void hist_browser__init(struct hist_browser *browser,
perf_hpp__reset_width(fmt, hists);
++browser->b.columns;
}
+ /* hierarchy entries have their own hpp list */
+ list_for_each_entry(node, &hists->hpp_formats, list) {
+ perf_hpp_list__for_each_format(&node->hpp, fmt)
+ perf_hpp__reset_width(fmt, hists);
+ }
}
struct hist_browser *hist_browser__new(struct hists *hists)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web