All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: He Kuang <hekuang@huawei.com>
Cc: a.p.zijlstra@chello.nl, mingo@redhat.com, acme@kernel.org,
	jolsa@kernel.org, kan.liang@intel.com, adrian.hunter@intel.com,
	wangnan0@huawei.com, pi3orama@163.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf tools: Prompt error message for wrong terms of hw/sw events
Date: Fri, 25 Sep 2015 10:15:32 +0200	[thread overview]
Message-ID: <20150925081532.GD21290@krava.redhat.com> (raw)
In-Reply-To: <1443151279-141093-1-git-send-email-hekuang@huawei.com>

On Fri, Sep 25, 2015 at 03:21:18AM +0000, He Kuang wrote:

SNIP

>  static int config_attr(struct perf_event_attr *attr,
>  		       struct list_head *head,
> -		       struct parse_events_error *err)
> +		       struct parse_events_error *err,
> +		       config_term_func_t config_term)
>  {
>  	struct parse_events_term *term;
>  
> @@ -735,7 +751,8 @@ int parse_events_add_numeric(struct parse_events_evlist *data,
>  	attr.config = config;
>  
>  	if (head_config) {
> -		if (config_attr(&attr, head_config, data->error))
> +		if (config_attr(&attr, head_config, data->error,
> +				config_term_common))
>  			return -EINVAL;
>  
>  		if (get_config_terms(head_config, &config_terms))
> @@ -795,7 +812,7 @@ int parse_events_add_pmu(struct parse_events_evlist *data,
>  	 * Configure hardcoded terms first, no need to check
>  	 * return value when called with fail == 0 ;)
>  	 */
> -	if (config_attr(&attr, head_config, data->error))
> +	if (config_attr(&attr, head_config, data->error, config_term_pmu))
>  		return -EINVAL;
>  
>  	if (get_config_terms(head_config, &config_terms))
> @@ -1861,3 +1878,26 @@ void parse_events_evlist_error(struct parse_events_evlist *data,
>  	err->str = strdup(str);
>  	WARN_ONCE(!err->str, "WARNING: failed to allocate error string");

could you please plit this into the part that adds the
config_term callback and the error message formating change?

thanks,
jirka

      parent reply	other threads:[~2015-09-25  8:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25  3:21 [PATCH 1/2] perf tools: Prompt error message for wrong terms of hw/sw events He Kuang
2015-09-25  3:21 ` [PATCH 2/2] perf tools: Enable event_config terms to tracepoint events He Kuang
2015-09-25  8:29   ` Jiri Olsa
2015-09-25  8:31   ` Jiri Olsa
2015-09-25  8:15 ` Jiri Olsa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150925081532.GD21290@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.