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


Groups > linux.kernel > #1233743

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

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/4] perf tools: Prompt error message for wrong terms of hw/sw events
Date 2015-09-27 22:30 +0200
Message-ID <qdqK6-VQ-1@gated-at.bofh.it> (permalink)
References <qczcJ-88V-5@gated-at.bofh.it> <qczcK-88V-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 25, 2015 at 11:11:49AM +0000, He Kuang wrote:

SNIP

> +char *parse_events_formats_error_string(char *additional_terms)
> +{
> +	char *str;
> +	static const char *static_terms = "config,config1,config2,name,"
> +					  "period,freq,branch_type,time,"
> +					  "call-graph,stack-size\n";
> +
> +	/* valid terms */
> +	if (additional_terms) {
> +		if (!asprintf(&str, "valid terms: %s,%s",
> +			      additional_terms, static_terms))
> +			goto fail;
> +		free(additional_terms);
> +	} else {
> +		if (!asprintf(&str, "valid terms: %s", static_terms))
> +			goto fail;
> +	}
> +	return str;
> +
> +fail:
> +	return NULL;
> +}

also please change the comment in the flex file

thanks,
jirka


---
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 936d566f48d8..c29832bce496 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -174,7 +174,7 @@ modifier_bp	[rwx]{1,3}
 
 <config>{
 	/*
-	 * Please update formats_error_string any time
+	 * Please update parse_events_formats_error_string any time
 	 * new static term is added.
 	 */
 config			{ return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG); }
--
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 v2 1/4] perf tools: Adds the config_term callback for different type events He Kuang <hekuang@huawei.com> - 2015-09-25 13:20 +0200
  [PATCH v2 2/4] perf tools: Prompt error message for wrong terms of hw/sw events He Kuang <hekuang@huawei.com> - 2015-09-25 13:20 +0200
    Re: [PATCH v2 2/4] perf tools: Prompt error message for wrong terms  of hw/sw events Jiri Olsa <jolsa@redhat.com> - 2015-09-27 22:30 +0200
    Re: [PATCH v2 2/4] perf tools: Prompt error message for wrong terms  of hw/sw events Jiri Olsa <jolsa@redhat.com> - 2015-09-27 22:30 +0200
    Re: [PATCH v2 2/4] perf tools: Prompt error message for wrong terms  of hw/sw events Jiri Olsa <jolsa@redhat.com> - 2015-09-27 22:40 +0200
  [PATCH v2 4/4] perf tools: Enable event_config terms to tracepoint events He Kuang <hekuang@huawei.com> - 2015-09-25 13:20 +0200
    Re: [PATCH v2 4/4] perf tools: Enable event_config terms to  tracepoint events Jiri Olsa <jolsa@redhat.com> - 2015-09-27 22:50 +0200

csiph-web