Commit e251abee authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf evlist: Fix the class prefix for 'struct evlist' 'add' evsel methods



To differentiate from libperf's 'struct perf_evlist' methods.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ce0dc7d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1319,7 +1319,7 @@ static struct evlist *kvm_live_event_list(void)
		*name = '\0';
		name++;

		if (perf_evlist__add_newtp(evlist, sys, name, NULL)) {
		if (evlist__add_newtp(evlist, sys, name, NULL)) {
			pr_err("Failed to add %s tracepoint to the list\n", *events_tp);
			free(tp);
			goto out;
+2 −2
Original line number Diff line number Diff line
@@ -852,7 +852,7 @@ static int record__open(struct record *rec)
	 * event synthesis.
	 */
	if (opts->initial_delay || target__has_cpu(&opts->target)) {
		if (perf_evlist__add_dummy(evlist))
		if (evlist__add_dummy(evlist))
			return -ENOMEM;

		/* Disable tracking of mmaps on lead event. */
@@ -2722,7 +2722,7 @@ int cmd_record(int argc, const char **argv)
		record.opts.tail_synthesize = true;

	if (rec->evlist->core.nr_entries == 0 &&
	    __perf_evlist__add_default(rec->evlist, !record.opts.no_samples) < 0) {
	    __evlist__add_default(rec->evlist, !record.opts.no_samples) < 0) {
		pr_err("Not enough memory for event selector list\n");
		goto out;
	}
+7 −9
Original line number Diff line number Diff line
@@ -1679,19 +1679,17 @@ static int add_default_attributes(void)
		if (target__has_cpu(&target))
			default_attrs0[0].config = PERF_COUNT_SW_CPU_CLOCK;

		if (perf_evlist__add_default_attrs(evsel_list, default_attrs0) < 0)
		if (evlist__add_default_attrs(evsel_list, default_attrs0) < 0)
			return -1;
		if (pmu_have_event("cpu", "stalled-cycles-frontend")) {
			if (perf_evlist__add_default_attrs(evsel_list,
						frontend_attrs) < 0)
			if (evlist__add_default_attrs(evsel_list, frontend_attrs) < 0)
				return -1;
		}
		if (pmu_have_event("cpu", "stalled-cycles-backend")) {
			if (perf_evlist__add_default_attrs(evsel_list,
						backend_attrs) < 0)
			if (evlist__add_default_attrs(evsel_list, backend_attrs) < 0)
				return -1;
		}
		if (perf_evlist__add_default_attrs(evsel_list, default_attrs1) < 0)
		if (evlist__add_default_attrs(evsel_list, default_attrs1) < 0)
			return -1;
	}

@@ -1701,21 +1699,21 @@ static int add_default_attributes(void)
		return 0;

	/* Append detailed run extra attributes: */
	if (perf_evlist__add_default_attrs(evsel_list, detailed_attrs) < 0)
	if (evlist__add_default_attrs(evsel_list, detailed_attrs) < 0)
		return -1;

	if (detailed_run < 2)
		return 0;

	/* Append very detailed run extra attributes: */
	if (perf_evlist__add_default_attrs(evsel_list, very_detailed_attrs) < 0)
	if (evlist__add_default_attrs(evsel_list, very_detailed_attrs) < 0)
		return -1;

	if (detailed_run < 3)
		return 0;

	/* Append very, very detailed run extra attributes: */
	return perf_evlist__add_default_attrs(evsel_list, very_very_detailed_attrs);
	return evlist__add_default_attrs(evsel_list, very_very_detailed_attrs);
}

static const char * const stat_record_usage[] = {
+1 −1
Original line number Diff line number Diff line
@@ -1627,7 +1627,7 @@ int cmd_top(int argc, const char **argv)
		goto out_delete_evlist;

	if (!top.evlist->core.nr_entries &&
	    perf_evlist__add_default(top.evlist) < 0) {
	    evlist__add_default(top.evlist) < 0) {
		pr_err("Not enough memory for event selector list\n");
		goto out_delete_evlist;
	}
+1 −2
Original line number Diff line number Diff line
@@ -3917,8 +3917,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
	}

	if (trace->sched &&
	    perf_evlist__add_newtp(evlist, "sched", "sched_stat_runtime",
				   trace__sched_stat_runtime))
	    evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime))
		goto out_error_sched_stat_runtime;
	/*
	 * If a global cgroup was set, apply it to all the events without an
Loading