perf evlist: Use the right prefix for alternative 'struct evlist' constructors
perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
		
							parent
							
								
									900c8ead5b
								
							
						
					
					
						commit
						606e2c2933
					
				| @ -52,7 +52,7 @@ int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subt | ||||
| 
 | ||||
| 	evlist = evlist__new(); | ||||
| 	if (!evlist) { | ||||
| 		pr_debug("perf_evlist__new failed\n"); | ||||
| 		pr_debug("evlist__new failed\n"); | ||||
| 		return TEST_FAIL; | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
| @ -144,7 +144,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), | ||||
| 	pid[sizeof(pid) - 1] = '\0'; | ||||
| 	opts.target.tid = opts.target.pid = pid; | ||||
| 
 | ||||
| 	/* Instead of perf_evlist__new_default, don't add default events */ | ||||
| 	/* Instead of evlist__new_default, don't add default events */ | ||||
| 	evlist = evlist__new(); | ||||
| 	if (!evlist) { | ||||
| 		pr_debug("Not enough memory to create evlist\n"); | ||||
|  | ||||
| @ -637,7 +637,7 @@ static int do_test_code_reading(bool try_kcore) | ||||
| 
 | ||||
| 		evlist = evlist__new(); | ||||
| 		if (!evlist) { | ||||
| 			pr_debug("perf_evlist__new failed\n"); | ||||
| 			pr_debug("evlist__new failed\n"); | ||||
| 			goto out_put; | ||||
| 		} | ||||
| 
 | ||||
|  | ||||
| @ -85,11 +85,10 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused, | ||||
| 
 | ||||
| int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unused) | ||||
| { | ||||
| 	struct evlist *evlist; | ||||
| 	struct evsel *evsel; | ||||
| 	struct event_name tmp; | ||||
| 	struct evlist *evlist = evlist__new_default(); | ||||
| 
 | ||||
| 	evlist = perf_evlist__new_default(); | ||||
| 	TEST_ASSERT_VAL("failed to get evlist", evlist); | ||||
| 
 | ||||
| 	evsel = evlist__first(evlist); | ||||
|  | ||||
| @ -100,10 +100,9 @@ out:	for (i = 0; i < nr_events; i++) | ||||
| static int expand_default_events(void) | ||||
| { | ||||
| 	int ret; | ||||
| 	struct evlist *evlist; | ||||
| 	struct rblist metric_events; | ||||
| 	struct evlist *evlist = evlist__new_default(); | ||||
| 
 | ||||
| 	evlist = perf_evlist__new_default(); | ||||
| 	TEST_ASSERT_VAL("failed to get evlist", evlist); | ||||
| 
 | ||||
| 	rblist__init(&metric_events); | ||||
|  | ||||
| @ -69,7 +69,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse | ||||
| 
 | ||||
| 	evlist = evlist__new(); | ||||
| 	if (evlist == NULL) { | ||||
| 		pr_debug("perf_evlist__new\n"); | ||||
| 		pr_debug("evlist__new\n"); | ||||
| 		goto out_free_cpus; | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
| @ -42,7 +42,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest | ||||
| 	char sbuf[STRERR_BUFSIZE]; | ||||
| 
 | ||||
| 	if (evlist == NULL) { | ||||
| 		pr_debug("%s: perf_evlist__new\n", __func__); | ||||
| 		pr_debug("%s: evlist__new\n", __func__); | ||||
| 		goto out; | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
| @ -53,7 +53,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus | ||||
| 	}; | ||||
| 	cpu_set_t cpu_mask; | ||||
| 	size_t cpu_mask_size = sizeof(cpu_mask); | ||||
| 	struct evlist *evlist = perf_evlist__new_dummy(); | ||||
| 	struct evlist *evlist = evlist__new_dummy(); | ||||
| 	struct evsel *evsel; | ||||
| 	struct perf_sample sample; | ||||
| 	const char *cmd = "sleep"; | ||||
| @ -71,7 +71,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus | ||||
| 	char sbuf[STRERR_BUFSIZE]; | ||||
| 
 | ||||
| 	if (evlist == NULL) /* Fallback for kernels lacking PERF_COUNT_SW_DUMMY */ | ||||
| 		evlist = perf_evlist__new_default(); | ||||
| 		evlist = evlist__new_default(); | ||||
| 
 | ||||
| 	if (evlist == NULL) { | ||||
| 		pr_debug("Not enough memory to create evlist\n"); | ||||
|  | ||||
| @ -58,9 +58,9 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused | ||||
| 
 | ||||
| 	signal(SIGCHLD, sig_handler); | ||||
| 
 | ||||
| 	evlist = perf_evlist__new_default(); | ||||
| 	evlist = evlist__new_default(); | ||||
| 	if (evlist == NULL) { | ||||
| 		pr_debug("perf_evlist__new_default\n"); | ||||
| 		pr_debug("evlist__new_default\n"); | ||||
| 		return -1; | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
| @ -40,7 +40,7 @@ static int session_write_header(char *path) | ||||
| 	session = perf_session__new(&data, false, NULL); | ||||
| 	TEST_ASSERT_VAL("can't get session", !IS_ERR(session)); | ||||
| 
 | ||||
| 	session->evlist = perf_evlist__new_default(); | ||||
| 	session->evlist = evlist__new_default(); | ||||
| 	TEST_ASSERT_VAL("can't get evlist", session->evlist); | ||||
| 
 | ||||
| 	perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); | ||||
|  | ||||
| @ -78,7 +78,7 @@ struct evlist *evlist__new(void) | ||||
| 	return evlist; | ||||
| } | ||||
| 
 | ||||
| struct evlist *perf_evlist__new_default(void) | ||||
| struct evlist *evlist__new_default(void) | ||||
| { | ||||
| 	struct evlist *evlist = evlist__new(); | ||||
| 
 | ||||
| @ -90,7 +90,7 @@ struct evlist *perf_evlist__new_default(void) | ||||
| 	return evlist; | ||||
| } | ||||
| 
 | ||||
| struct evlist *perf_evlist__new_dummy(void) | ||||
| struct evlist *evlist__new_dummy(void) | ||||
| { | ||||
| 	struct evlist *evlist = evlist__new(); | ||||
| 
 | ||||
|  | ||||
| @ -87,8 +87,8 @@ struct evsel_str_handler { | ||||
| }; | ||||
| 
 | ||||
| struct evlist *evlist__new(void); | ||||
| struct evlist *perf_evlist__new_default(void); | ||||
| struct evlist *perf_evlist__new_dummy(void); | ||||
| struct evlist *evlist__new_default(void); | ||||
| struct evlist *evlist__new_dummy(void); | ||||
| void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus, | ||||
| 		  struct perf_thread_map *threads); | ||||
| void evlist__exit(struct evlist *evlist); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user