aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events/core.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2014-07-14 11:57:19 -0400
committerIngo Molnar <mingo@kernel.org>2014-07-16 07:31:22 -0400
commitfbe26abe118ee1262b4ab0d12fefd42647eaea35 (patch)
tree74ba5684042ca588e45495ca042441e3452e501a /kernel/events/core.c
parent503d3291a937b726757c1f7c45fa02389d2f4324 (diff)
perf: Add vm_ops->name call for mmap event name retrieval
The following patch added another way to get mmap name: 78d683e838a6 ("mm, fs: Add vm_ops->name as an alternative to arch_vma_name") The vdso vma mapping already switch to this and we no longer get vdso name via arch_vma_name function. Adding this way to the perf mmap event name retrieval code. Caught this via perf test: $ sudo ./perf test -v 7 7: Validate PERF_RECORD_* events & perf_sample fields : --- start --- SNIP PERF_RECORD_MMAP for [vdso] missing! test child finished with 255 ---- end ---- Validate PERF_RECORD_* events & perf_sample fields: FAILED! Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1405353439-14211-1-git-send-email-jolsa@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r--kernel/events/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 67e3b9c9a7d4..47996766e3da 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5266,6 +5266,12 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
5266 5266
5267 goto got_name; 5267 goto got_name;
5268 } else { 5268 } else {
5269 if (vma->vm_ops && vma->vm_ops->name) {
5270 name = (char *) vma->vm_ops->name(vma);
5271 if (name)
5272 goto cpy_name;
5273 }
5274
5269 name = (char *)arch_vma_name(vma); 5275 name = (char *)arch_vma_name(vma);
5270 if (name) 5276 if (name)
5271 goto cpy_name; 5277 goto cpy_name;