lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] perf tools: Prompt proper error message for wrong terms of hw/sw events
On Mon, Sep 28, 2015 at 03:52:14AM +0000, He Kuang wrote:
> Prompt proper error message and show valid terms when wrong config
> terms is specificed for hw/sw type perf events. This patch makes the
> original error prompt function formats_error_string() more generic,
> which only outputs the static config terms for hw/sw perf events, and
> prepends pmu formats for pmu events.
>
> Before this patch:
>
> $ perf record -e 'cpu-clock/freqx=200/' -a sleep 1
> invalid or unsupported event: 'cpu-clock/freqx=200/'
> 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
>
> After this patch:
>
> $ perf record -e 'cpu-clock/freqx=200/' -a sleep 1
> event syntax error: 'cpu-clock/freqx=200/'
> \___ unknown term
>
> valid terms: config,config1,config2,name,period,freq,branch_type,time,call-graph,stack-size
>
> 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
>
> Signed-off-by: He Kuang <hekuang@huawei.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka


\
 
 \ /
  Last update: 2015-09-28 22:01    [W:0.079 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site