Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330694 > unrolled thread
| Started by | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| First post | 2016-02-09 23:40 +0100 |
| Last post | 2016-02-10 15:50 +0100 |
| Articles | 3 — 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 23/23] perf top: Add --hierarchy option Jiri Olsa <jolsa@redhat.com> - 2016-02-09 23:40 +0100
Re: [PATCH 23/23] perf top: Add --hierarchy option Jiri Olsa <jolsa@redhat.com> - 2016-02-10 14:30 +0100
Re: [PATCH 23/23] perf top: Add --hierarchy option Namhyung Kim <namhyung@kernel.org> - 2016-02-10 15:50 +0100
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-02-09 23:40 +0100 |
| Subject | Re: [PATCH 23/23] perf top: Add --hierarchy option |
| Message-ID | <r0p6V-1XI-1@gated-at.bofh.it> |
On Fri, Feb 05, 2016 at 10:01:55PM +0900, Namhyung Kim wrote:
> Support hierarchy output for perf-top using --hierarchy option.
>
> Acked-by: Pekka Enberg <penberg@kernel.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/Documentation/perf-top.txt | 3 +++
> tools/perf/builtin-top.c | 15 +++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
> index b0e60e17db38..19f046f027cd 100644
> --- a/tools/perf/Documentation/perf-top.txt
> +++ b/tools/perf/Documentation/perf-top.txt
> @@ -233,6 +233,9 @@ Default is to monitor all CPUS.
> --raw-trace::
> When displaying traceevent output, do not use print fmt or plugins.
>
> +--hierarchy::
> + Enable hierarchy output.
> +
> INTERACTIVE PROMPTING KEYS
> --------------------------
>
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index a75de3940b97..b86b623e8799 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -1214,6 +1214,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
> parse_branch_stack),
> OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace,
> "Show raw trace event output (do not use print fmt or plugins)"),
> + OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy,
> + "Show entries in a hierarchy"),
> OPT_END()
> };
> const char * const top_usage[] = {
> @@ -1241,6 +1243,19 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
> goto out_delete_evlist;
> }
>
> + if (symbol_conf.report_hierarchy) {
> + /* disable incompatible options */
> + symbol_conf.event_group = false;
> + symbol_conf.cumulate_callchain = false;
> +
> + if (field_order) {
> + pr_err("Error: --hierarchy and --fields options cannot be used together\n");
> + parse_options_usage(top_usage, options, "fields", 0);
> + parse_options_usage(NULL, options, "hierarchy", 0);
> + goto out_delete_evlist;
> + }
> + }
I was wondering about this when I was going through the patchset ;-)
jirka
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-02-10 14:30 +0100 |
| Message-ID | <r0D0g-2IY-29@gated-at.bofh.it> |
| In reply to | #1330694 |
On Tue, Feb 09, 2016 at 11:37:10PM +0100, Jiri Olsa wrote:
> On Fri, Feb 05, 2016 at 10:01:55PM +0900, Namhyung Kim wrote:
> > Support hierarchy output for perf-top using --hierarchy option.
> >
> > Acked-by: Pekka Enberg <penberg@kernel.org>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/Documentation/perf-top.txt | 3 +++
> > tools/perf/builtin-top.c | 15 +++++++++++++++
> > 2 files changed, 18 insertions(+)
> >
> > diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
> > index b0e60e17db38..19f046f027cd 100644
> > --- a/tools/perf/Documentation/perf-top.txt
> > +++ b/tools/perf/Documentation/perf-top.txt
> > @@ -233,6 +233,9 @@ Default is to monitor all CPUS.
> > --raw-trace::
> > When displaying traceevent output, do not use print fmt or plugins.
> >
> > +--hierarchy::
> > + Enable hierarchy output.
> > +
> > INTERACTIVE PROMPTING KEYS
> > --------------------------
> >
> > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> > index a75de3940b97..b86b623e8799 100644
> > --- a/tools/perf/builtin-top.c
> > +++ b/tools/perf/builtin-top.c
> > @@ -1214,6 +1214,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
> > parse_branch_stack),
> > OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace,
> > "Show raw trace event output (do not use print fmt or plugins)"),
> > + OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy,
> > + "Show entries in a hierarchy"),
> > OPT_END()
> > };
> > const char * const top_usage[] = {
> > @@ -1241,6 +1243,19 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
> > goto out_delete_evlist;
> > }
> >
> > + if (symbol_conf.report_hierarchy) {
> > + /* disable incompatible options */
> > + symbol_conf.event_group = false;
> > + symbol_conf.cumulate_callchain = false;
> > +
> > + if (field_order) {
> > + pr_err("Error: --hierarchy and --fields options cannot be used together\n");
> > + parse_options_usage(top_usage, options, "fields", 0);
> > + parse_options_usage(NULL, options, "hierarchy", 0);
> > + goto out_delete_evlist;
> > + }
> > + }
>
> I was wondering about this when I was going through the patchset ;-)
but isn't that too restricting? hows about fields like
overhead_sys/us, samples, period
jirka
[toc] | [prev] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-02-10 15:50 +0100 |
| Message-ID | <r0EfE-3qm-19@gated-at.bofh.it> |
| In reply to | #1331168 |
On Wed, Feb 10, 2016 at 02:19:40PM +0100, Jiri Olsa wrote:
> On Tue, Feb 09, 2016 at 11:37:10PM +0100, Jiri Olsa wrote:
> > On Fri, Feb 05, 2016 at 10:01:55PM +0900, Namhyung Kim wrote:
> > > Support hierarchy output for perf-top using --hierarchy option.
> > >
> > > Acked-by: Pekka Enberg <penberg@kernel.org>
> > > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > > ---
> > > tools/perf/Documentation/perf-top.txt | 3 +++
> > > tools/perf/builtin-top.c | 15 +++++++++++++++
> > > 2 files changed, 18 insertions(+)
> > >
> > > diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
> > > index b0e60e17db38..19f046f027cd 100644
> > > --- a/tools/perf/Documentation/perf-top.txt
> > > +++ b/tools/perf/Documentation/perf-top.txt
> > > @@ -233,6 +233,9 @@ Default is to monitor all CPUS.
> > > --raw-trace::
> > > When displaying traceevent output, do not use print fmt or plugins.
> > >
> > > +--hierarchy::
> > > + Enable hierarchy output.
> > > +
> > > INTERACTIVE PROMPTING KEYS
> > > --------------------------
> > >
> > > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> > > index a75de3940b97..b86b623e8799 100644
> > > --- a/tools/perf/builtin-top.c
> > > +++ b/tools/perf/builtin-top.c
> > > @@ -1214,6 +1214,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
> > > parse_branch_stack),
> > > OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace,
> > > "Show raw trace event output (do not use print fmt or plugins)"),
> > > + OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy,
> > > + "Show entries in a hierarchy"),
> > > OPT_END()
> > > };
> > > const char * const top_usage[] = {
> > > @@ -1241,6 +1243,19 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
> > > goto out_delete_evlist;
> > > }
> > >
> > > + if (symbol_conf.report_hierarchy) {
> > > + /* disable incompatible options */
> > > + symbol_conf.event_group = false;
> > > + symbol_conf.cumulate_callchain = false;
> > > +
> > > + if (field_order) {
> > > + pr_err("Error: --hierarchy and --fields options cannot be used together\n");
> > > + parse_options_usage(top_usage, options, "fields", 0);
> > > + parse_options_usage(NULL, options, "hierarchy", 0);
> > > + goto out_delete_evlist;
> > > + }
> > > + }
> >
> > I was wondering about this when I was going through the patchset ;-)
>
> but isn't that too restricting? hows about fields like
> overhead_sys/us, samples, period
Allowing -F/--fields option cannot ensure the hierarchy mode working
correctly. Those fields can be shown with following options anyway..
-n, --show-nr-samples
Show a column with the number of samples
--show-cpu-utilization
Show sample percentage for different cpu modes
--show-total-period
Show a column with the sum of periods
Thanks,
Namhyung
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web