Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1332743 > unrolled thread
| Started by | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| First post | 2016-02-12 14:50 +0100 |
| Last post | 2016-02-12 17:00 +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 10/54] perf stat: Forbid user passing improper config terms Jiri Olsa <jolsa@redhat.com> - 2016-02-12 14:50 +0100
Re: [PATCH 10/54] perf stat: Forbid user passing improper config terms Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-02-12 16:50 +0100
Re: [PATCH 10/54] perf stat: Forbid user passing improper config terms Jiri Olsa <jolsa@redhat.com> - 2016-02-12 17:00 +0100
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-02-12 14:50 +0100 |
| Subject | Re: [PATCH 10/54] perf stat: Forbid user passing improper config terms |
| Message-ID | <r1mgF-7Hp-3@gated-at.bofh.it> |
On Fri, Feb 05, 2016 at 02:01:35PM +0000, Wang Nan wrote: > 'perf stat' accepts some config terms but doesn't apply them. For > example: > > # perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash > # ls > # exit > > Performance counter stats for 'bash': > > 266258061 instructions/no-inherit/ > 266258061 instructions/inherit/ hum, but we support no-/inherit in stat, it'd be better to implement this one for stat IMO > > 1.402183915 seconds time elapsed > > The result is confusing, because user may expect the first > 'instructions' event exclude the 'ls' command. > > This patch forbit most of those config terms for 'perf stat'. > > Result: > > # ./perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash > event syntax error: 'instructions/no-inherit/' > \___ Don't use record mode only config terms and there's bunch of others which are sampling related: PARSE_EVENTS__TERM_TYPE_SAMPLE_* PERF_EVSEL__CONFIG_TERM_CALLGRAPH PERF_EVSEL__CONFIG_TERM_STACK_USER ... probably all from get_config_terms apart from the 'inherot' ones, which should end up with the error message, which could be more user friendly like: - Can't use stack-size term in stat event. thanks, jirka
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2016-02-12 16:50 +0100 |
| Message-ID | <r1o8O-tk-15@gated-at.bofh.it> |
| In reply to | #1332743 |
Em Fri, Feb 12, 2016 at 02:49:08PM +0100, Jiri Olsa escreveu:
> On Fri, Feb 05, 2016 at 02:01:35PM +0000, Wang Nan wrote:
> > 'perf stat' accepts some config terms but doesn't apply them. For
> > example:
> >
> > # perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash
> > # ls
> > # exit
> >
> > Performance counter stats for 'bash':
> >
> > 266258061 instructions/no-inherit/
> > 266258061 instructions/inherit/
>
> hum, but we support no-/inherit in stat, it'd be better to
> implement this one for stat IMO
>
>
> >
> > 1.402183915 seconds time elapsed
> >
> > The result is confusing, because user may expect the first
> > 'instructions' event exclude the 'ls' command.
> >
> > This patch forbit most of those config terms for 'perf stat'.
> >
> > Result:
> >
> > # ./perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash
> > event syntax error: 'instructions/no-inherit/'
> > \___ Don't use record mode only config terms
>
> and there's bunch of others which are sampling related:
> PARSE_EVENTS__TERM_TYPE_SAMPLE_*
> PERF_EVSEL__CONFIG_TERM_CALLGRAPH
> PERF_EVSEL__CONFIG_TERM_STACK_USER
> ...
>
> probably all from get_config_terms apart from the 'inherot' ones,
> which should end up with the error message, which could be more
> user friendly like:
>
> - Can't use stack-size term in stat event.
'stat' event? If this is the term you want to use maybe:
'stack-size' is not usable in 'perf stat'.
But perhaps it would be better as:
'stack-size' can only be used when sampling.
Or even more verbose:
The 'stack-size' can only be configured when sampling, not when just
counting events.
No?
- Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-02-12 17:00 +0100 |
| Message-ID | <r1oiu-ws-15@gated-at.bofh.it> |
| In reply to | #1332817 |
On Fri, Feb 12, 2016 at 01:45:17PM -0200, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 12, 2016 at 02:49:08PM +0100, Jiri Olsa escreveu: > > On Fri, Feb 05, 2016 at 02:01:35PM +0000, Wang Nan wrote: > > > 'perf stat' accepts some config terms but doesn't apply them. For > > > example: > > > > > > # perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash > > > # ls > > > # exit > > > > > > Performance counter stats for 'bash': > > > > > > 266258061 instructions/no-inherit/ > > > 266258061 instructions/inherit/ > > > > hum, but we support no-/inherit in stat, it'd be better to > > implement this one for stat IMO > > > > > > > > > > 1.402183915 seconds time elapsed > > > > > > The result is confusing, because user may expect the first > > > 'instructions' event exclude the 'ls' command. > > > > > > This patch forbit most of those config terms for 'perf stat'. > > > > > > Result: > > > > > > # ./perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash > > > event syntax error: 'instructions/no-inherit/' > > > \___ Don't use record mode only config terms > > > > and there's bunch of others which are sampling related: > > PARSE_EVENTS__TERM_TYPE_SAMPLE_* > > PERF_EVSEL__CONFIG_TERM_CALLGRAPH > > PERF_EVSEL__CONFIG_TERM_STACK_USER > > ... > > > > probably all from get_config_terms apart from the 'inherot' ones, > > which should end up with the error message, which could be more > > user friendly like: > > > > - Can't use stack-size term in stat event. > > 'stat' event? If this is the term you want to use maybe: > > 'stack-size' is not usable in 'perf stat'. ok I vote for this one then ^^^ ;-) jirka
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web