lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Jun 2015 11:39:09 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Jiri Olsa <jolsa@...hat.com>, David Ahern <dsahern@...il.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [GIT PULL 0/8] perf/pt -> Intel PT/BTS

Em Tue, Jun 30, 2015 at 04:23:45PM +0300, Adrian Hunter escreveu:
> On 30/06/15 13:56, Ingo Molnar wrote:
> > 
> > * Adrian Hunter <adrian.hunter@...el.com> wrote:
> > 
> >>> Yeah, so I did a 'newbie test':
> >>>
> >>> I pulled the tree and saw that it has a tools/perf/Documentation/intel-bts.txt 
> >>> file and started reading it.
> >>>
> >>> Based on its text:
> >>>
> >>>   The Intel BTS kernel driver creates a new PMU for Intel BTS.  The perf record
> >>>   option is:
> >>>
> >>>         -e intel_bts//
> >>>
> >>>   Currently Intel BTS is limited to per-thread tracing so the --per-thread option
> >>>   is also needed.
> >>>
> >>> I tried the following command which failed:
> >>>
> >>>   triton:~/tip> perf record -e intel_bts// --per-thread sleep 1
> >>>   invalid or unsupported event: 'intel_bts//'
> >>>   Run 'perf list' for a list of valid events
> >>>
> >>>    usage: perf record [<options>] [<command>]
> >>>       or: perf record [<options>] -- <command> [<options>]
> >>>
> >>>       -e, --event <event>   event selector. use 'perf list' to list available events
> >>>
> >>> That's a really ... unhelpful message. If I typoed something I want to know that. 
> >>> If the kernel does not support something, I want to know about that too. Tooling 
> >>> telling me: "maybe you typoed something, maybe it's not supported, I really don't 
> >>> care" is not very productive.
> >>
> >> That is not entirely true. The message says "Run 'perf list' for a list of valid 
> >> events" which will tell you if the event is valid. So you can tell the 
> >> difference between a typo and unsupported event.
> > 
> > Yeah, but my point is: why doesn't the tool do this disambiguation for me? Tools 
> > are hard enough to use as-is already, no need to put artificial roadblocks in the 
> > path of first time users.
> 
> That applies to all events e.g.
> 
> # perf record -e sched:sched_swotch sleep 1
> invalid or unsupported event: 'sched:sched_swotch'                                                                                       
> Run 'perf list' for a list of valid events                                                                                               
>                                                                                                                                          
>  usage: perf record [<options>] [<command>]                                                                                              
>     or: perf record [<options>] -- <command> [<options>]                                                                                 
>                                                                                                                                          
>     -e, --event <event>   event selector. use 'perf list' to list available events    
> 
> So it is a general problem.

Right, guess it is interesting to note at this point that Jiri improved
this area:

[acme@zoo linux]$ perf record -e sched:sched_swotch sleep 1
event syntax error: 'sched:sched_swotch'
                     \___ unknown tracepoint
Run 'perf list' for a list of valid events

 usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -e, --event <event>   event selector. use 'perf list' to list available events
[acme@zoo linux]$

But:

[acme@zoo linux]$ perf record -e intel_pt// usleep 1
invalid or unsupported event: 'intel_pt//'
Run 'perf list' for a list of valid events

 usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -e, --event <event>   event selector. use 'perf list' to list available events
[acme@zoo linux]$

I'll investigate how this can be improved...

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ