Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234387

Re: [PATCH v3 2/4] perf tools: Prompt proper error message for wrong terms of hw/sw events

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/4] perf tools: Prompt proper error message for wrong terms of hw/sw events
Date 2015-09-28 21:40 +0200
Message-ID <qdMrg-sh-27@gated-at.bofh.it> (permalink)
References <qdxLz-2vE-1@gated-at.bofh.it> <qdxLz-2vE-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/4] perf tools: Adds the config_term callback for different type events He Kuang <hekuang@huawei.com> - 2015-09-28 06:00 +0200
  [PATCH v3 2/4] perf tools: Prompt proper error message for wrong terms of hw/sw events He Kuang <hekuang@huawei.com> - 2015-09-28 06:00 +0200
    Re: [PATCH v3 2/4] perf tools: Prompt proper error message for wrong  terms of hw/sw events Jiri Olsa <jolsa@redhat.com> - 2015-09-28 21:40 +0200
    [tip:perf/core] perf tools:   Show proper error message for wrong terms of hw/sw events tip-bot for He Kuang <tipbot@zytor.com> - 2015-09-29 11:00 +0200
  [PATCH v3 3/4] perf tools: Adds the tracepoint name parsing support He Kuang <hekuang@huawei.com> - 2015-09-28 06:00 +0200
    Re: [PATCH v3 3/4] perf tools: Adds the tracepoint name parsing  support Jiri Olsa <jolsa@redhat.com> - 2015-09-28 21:50 +0200
    [tip:perf/core] perf tools:   Adds the tracepoint name parsing support tip-bot for He Kuang <tipbot@zytor.com> - 2015-09-29 11:00 +0200
  [PATCH v3 4/4] perf tools: Enable event_config terms to tracepoint events He Kuang <hekuang@huawei.com> - 2015-09-28 06:00 +0200
    Re: [PATCH v3 4/4] perf tools: Enable event_config terms to  tracepoint events Jiri Olsa <jolsa@redhat.com> - 2015-09-28 21:50 +0200
    [tip:perf/core] perf tools:   Enable event_config terms to tracepoint events tip-bot for He Kuang <tipbot@zytor.com> - 2015-09-29 11:00 +0200
  Re: [PATCH v3 1/4] perf tools: Adds the config_term callback for  different type events Jiri Olsa <jolsa@redhat.com> - 2015-09-28 21:40 +0200
  Re: [PATCH v3 1/4] perf tools: Adds the config_term callback for  different type events Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 22:40 +0200
  [tip:perf/core] perf tools:   Adds the config_term callback for different type events tip-bot for He Kuang <tipbot@zytor.com> - 2015-09-29 11:00 +0200

csiph-web