Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf kmem: Rename perf_evsel__*() operating on 'struct evsel *' to evsel__*()

As those is a 'struct evsel' methods, not part of tools/lib/perf/, aka
libperf, to whom the perf_ prefix belongs.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+14 -19
+14 -19
tools/perf/builtin-kmem.c
··· 169 169 return 0; 170 170 } 171 171 172 - static int perf_evsel__process_alloc_event(struct evsel *evsel, 173 - struct perf_sample *sample) 172 + static int evsel__process_alloc_event(struct evsel *evsel, struct perf_sample *sample) 174 173 { 175 174 unsigned long ptr = evsel__intval(evsel, sample, "ptr"), 176 175 call_site = evsel__intval(evsel, sample, "call_site"); ··· 187 188 return 0; 188 189 } 189 190 190 - static int perf_evsel__process_alloc_node_event(struct evsel *evsel, 191 - struct perf_sample *sample) 191 + static int evsel__process_alloc_node_event(struct evsel *evsel, struct perf_sample *sample) 192 192 { 193 - int ret = perf_evsel__process_alloc_event(evsel, sample); 193 + int ret = evsel__process_alloc_event(evsel, sample); 194 194 195 195 if (!ret) { 196 196 int node1 = cpu__get_node(sample->cpu), ··· 230 232 return NULL; 231 233 } 232 234 233 - static int perf_evsel__process_free_event(struct evsel *evsel, 234 - struct perf_sample *sample) 235 + static int evsel__process_free_event(struct evsel *evsel, struct perf_sample *sample) 235 236 { 236 237 unsigned long ptr = evsel__intval(evsel, sample, "ptr"); 237 238 struct alloc_stat *s_alloc, *s_caller; ··· 781 784 return 0; 782 785 } 783 786 784 - static int perf_evsel__process_page_alloc_event(struct evsel *evsel, 785 - struct perf_sample *sample) 787 + static int evsel__process_page_alloc_event(struct evsel *evsel, struct perf_sample *sample) 786 788 { 787 789 u64 page; 788 790 unsigned int order = evsel__intval(evsel, sample, "order"); ··· 853 857 return 0; 854 858 } 855 859 856 - static int perf_evsel__process_page_free_event(struct evsel *evsel, 857 - struct perf_sample *sample) 860 + static int evsel__process_page_free_event(struct evsel *evsel, struct perf_sample *sample) 858 861 { 859 862 u64 page; 860 863 unsigned int order = evsel__intval(evsel, sample, "order"); ··· 1366 1371 struct evsel *evsel; 1367 1372 const struct evsel_str_handler kmem_tracepoints[] = { 1368 1373 /* slab allocator */ 1369 - { "kmem:kmalloc", perf_evsel__process_alloc_event, }, 1370 - { "kmem:kmem_cache_alloc", perf_evsel__process_alloc_event, }, 1371 - { "kmem:kmalloc_node", perf_evsel__process_alloc_node_event, }, 1372 - { "kmem:kmem_cache_alloc_node", perf_evsel__process_alloc_node_event, }, 1373 - { "kmem:kfree", perf_evsel__process_free_event, }, 1374 - { "kmem:kmem_cache_free", perf_evsel__process_free_event, }, 1374 + { "kmem:kmalloc", evsel__process_alloc_event, }, 1375 + { "kmem:kmem_cache_alloc", evsel__process_alloc_event, }, 1376 + { "kmem:kmalloc_node", evsel__process_alloc_node_event, }, 1377 + { "kmem:kmem_cache_alloc_node", evsel__process_alloc_node_event, }, 1378 + { "kmem:kfree", evsel__process_free_event, }, 1379 + { "kmem:kmem_cache_free", evsel__process_free_event, }, 1375 1380 /* page allocator */ 1376 - { "kmem:mm_page_alloc", perf_evsel__process_page_alloc_event, }, 1377 - { "kmem:mm_page_free", perf_evsel__process_page_free_event, }, 1381 + { "kmem:mm_page_alloc", evsel__process_page_alloc_event, }, 1382 + { "kmem:mm_page_free", evsel__process_page_free_event, }, 1378 1383 }; 1379 1384 1380 1385 if (!perf_session__has_traces(session, "kmem record"))