lkml.org 
[lkml]   [2016]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/54] perf stat: Forbid user passing improper config terms
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

\
 
 \ /
  Last update: 2016-02-12 15:01    [W:0.435 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site