Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330680 > unrolled thread
| Started by | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| First post | 2016-02-09 23:10 +0100 |
| Last post | 2016-02-10 15:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 14/23] perf ui/stdio: Implement hierarchy output mode Jiri Olsa <jolsa@redhat.com> - 2016-02-09 23:10 +0100
Re: [PATCH 14/23] perf ui/stdio: Implement hierarchy output mode Namhyung Kim <namhyung@kernel.org> - 2016-02-10 15:30 +0100
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-02-09 23:10 +0100 |
| Subject | Re: [PATCH 14/23] perf ui/stdio: Implement hierarchy output mode |
| Message-ID | <r0oDV-1LZ-25@gated-at.bofh.it> |
On Fri, Feb 05, 2016 at 10:01:46PM +0900, Namhyung Kim wrote:
> The hierarchy output mode is to group entries for each level so that
> user can see higher level picture more easily. It also helps to find
> out which component is most costly. The output will look like below:
>
> 15.11% swapper
> 14.97% [kernel.vmlinux]
> 0.09% [libahci]
> 0.05% [iwlwifi]
> 10.29% irq/33-iwlwifi
> 6.45% [kernel.vmlinux]
> 1.41% [mac80211]
> 1.15% [iwldvm]
> 1.14% [iwlwifi]
> 0.14% [cfg80211]
> 4.81% firefox
> 3.92% libxul.so
> 0.34% [kernel.vmlinux]
>
> Acked-by: Pekka Enberg <penberg@kernel.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/ui/hist.c | 14 +++++++++
> tools/perf/ui/stdio/hist.c | 77 +++++++++++++++++++++++++++++++++++++++++++++-
> tools/perf/util/hist.h | 4 +++
> 3 files changed, 94 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
> index 1ba4117d9c2d..c398ce288615 100644
> --- a/tools/perf/ui/hist.c
> +++ b/tools/perf/ui/hist.c
> @@ -687,3 +687,17 @@ void perf_hpp__set_user_width(const char *width_list_str)
> break;
> }
> }
> +
> +int perf_hpp__count_sort_keys(void)
> +{
> + int nr_sort = 0;
> + struct perf_hpp_fmt *fmt;
> +
> + perf_hpp_list__for_each_format(&perf_hpp_list, fmt) {
> + if (perf_hpp__is_sort_entry(fmt) ||
> + perf_hpp__is_dynamic_entry(fmt))
> + nr_sort++;
> + }
> +
> + return nr_sort;
> +}
hum, this seems expensive.. also we should do that
in generic way per perf_hpp_list struct
we could hold number of sort entries in struct perf_hpp_list
and count it in:
perf_hpp_list__register_sort_field
thanks,
jirka
[toc] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-02-10 15:30 +0100 |
| Message-ID | <r0DWi-3jE-11@gated-at.bofh.it> |
| In reply to | #1330680 |
On Tue, Feb 09, 2016 at 11:01:17PM +0100, Jiri Olsa wrote:
> On Fri, Feb 05, 2016 at 10:01:46PM +0900, Namhyung Kim wrote:
> > The hierarchy output mode is to group entries for each level so that
> > user can see higher level picture more easily. It also helps to find
> > out which component is most costly. The output will look like below:
> >
> > 15.11% swapper
> > 14.97% [kernel.vmlinux]
> > 0.09% [libahci]
> > 0.05% [iwlwifi]
> > 10.29% irq/33-iwlwifi
> > 6.45% [kernel.vmlinux]
> > 1.41% [mac80211]
> > 1.15% [iwldvm]
> > 1.14% [iwlwifi]
> > 0.14% [cfg80211]
> > 4.81% firefox
> > 3.92% libxul.so
> > 0.34% [kernel.vmlinux]
> >
> > Acked-by: Pekka Enberg <penberg@kernel.org>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/ui/hist.c | 14 +++++++++
> > tools/perf/ui/stdio/hist.c | 77 +++++++++++++++++++++++++++++++++++++++++++++-
> > tools/perf/util/hist.h | 4 +++
> > 3 files changed, 94 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
> > index 1ba4117d9c2d..c398ce288615 100644
> > --- a/tools/perf/ui/hist.c
> > +++ b/tools/perf/ui/hist.c
> > @@ -687,3 +687,17 @@ void perf_hpp__set_user_width(const char *width_list_str)
> > break;
> > }
> > }
> > +
> > +int perf_hpp__count_sort_keys(void)
> > +{
> > + int nr_sort = 0;
> > + struct perf_hpp_fmt *fmt;
> > +
> > + perf_hpp_list__for_each_format(&perf_hpp_list, fmt) {
> > + if (perf_hpp__is_sort_entry(fmt) ||
> > + perf_hpp__is_dynamic_entry(fmt))
> > + nr_sort++;
> > + }
> > +
> > + return nr_sort;
> > +}
>
> hum, this seems expensive.. also we should do that
> in generic way per perf_hpp_list struct
OK. But this is not called frequently though..
>
> we could hold number of sort entries in struct perf_hpp_list
> and count it in:
> perf_hpp_list__register_sort_field
OK.
Thanks,
Namhyung
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web