Commit 6c191289 authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo
Browse files

perf parse-events: Rename parse_events_error functions



Group error functions and name after the data type they manipulate.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20211107090002.3784612-1-irogers@google.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e4e29079
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static int is_tracepoint_available(const char *str, struct evlist *evlist)
	bzero(&err, sizeof(err));
	ret = parse_events(evlist, str, &err);
	if (err.str)
		parse_events_print_error(&err, "tracepoint");
		parse_events_error__print(&err, "tracepoint");
	return ret;
}

+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static struct evlist *bench__create_evlist(char *evstr)

	ret = parse_events(evlist, evstr, &err);
	if (ret) {
		parse_events_print_error(&err, evstr);
		parse_events_error__print(&err, evstr);
		pr_err("Run 'perf list' for a list of valid events\n");
		ret = 1;
		goto out_delete_evlist;
+5 −5
Original line number Diff line number Diff line
@@ -1782,7 +1782,7 @@ static int add_default_attributes(void)
					   &errinfo);
		if (err) {
			fprintf(stderr, "Cannot set up transaction events\n");
			parse_events_print_error(&errinfo, transaction_attrs);
			parse_events_error__print(&errinfo, transaction_attrs);
			return -1;
		}
		return 0;
@@ -1812,11 +1812,11 @@ static int add_default_attributes(void)
		} else {
			fprintf(stderr, "To measure SMI cost, it needs "
				"msr/aperf/, msr/smi/ and cpu/cycles/ support\n");
			parse_events_print_error(&errinfo, smi_cost_attrs);
			parse_events_error__print(&errinfo, smi_cost_attrs);
			return -1;
		}
		if (err) {
			parse_events_print_error(&errinfo, smi_cost_attrs);
			parse_events_error__print(&errinfo, smi_cost_attrs);
			fprintf(stderr, "Cannot set up SMI cost events\n");
			return -1;
		}
@@ -1883,7 +1883,7 @@ static int add_default_attributes(void)
				fprintf(stderr,
					"Cannot set up top down events %s: %d\n",
					str, err);
				parse_events_print_error(&errinfo, str);
				parse_events_error__print(&errinfo, str);
				free(str);
				return -1;
			}
@@ -1911,7 +1911,7 @@ static int add_default_attributes(void)
				fprintf(stderr,
					"Cannot set up hybrid events %s: %d\n",
					hybrid_str, err);
				parse_events_print_error(&errinfo, hybrid_str);
				parse_events_error__print(&errinfo, hybrid_str);
				return -1;
			}
			return err;
+1 −1
Original line number Diff line number Diff line
@@ -4928,7 +4928,7 @@ int cmd_trace(int argc, const char **argv)
		bzero(&parse_err, sizeof(parse_err));
		err = parse_events(trace.evlist, trace.perfconfig_events, &parse_err);
		if (err) {
			parse_events_print_error(&parse_err, trace.perfconfig_events);
			parse_events_error__print(&parse_err, trace.perfconfig_events);
			goto out;
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ static int expand_group_events(void)
	if (ret < 0) {
		pr_debug("failed to parse event '%s', err %d, str '%s'\n",
			 event_str, ret, err.str);
		parse_events_print_error(&err, event_str);
		parse_events_error__print(&err, event_str);
		goto out;
	}

Loading