From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
mingo@kernel.org, jolsa@kernel.org,
torvalds@linux-foundation.org, peterz@infradead.org,
acme@kernel.org, namhyung@kernel.org, luto@amacapital.net,
fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de,
cjashfor@linux.vnet.ibm.com
Subject: [tip:perf/core] perf: Add vm_ops-> name call for mmap event name retrieval
Date: Wed, 16 Jul 2014 12:21:45 -0700 [thread overview]
Message-ID: <tip-fbe26abe118ee1262b4ab0d12fefd42647eaea35@git.kernel.org> (raw)
In-Reply-To: <1405353439-14211-1-git-send-email-jolsa@kernel.org>
Commit-ID: fbe26abe118ee1262b4ab0d12fefd42647eaea35
Gitweb: http://git.kernel.org/tip/fbe26abe118ee1262b4ab0d12fefd42647eaea35
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 14 Jul 2014 17:57:19 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 16 Jul 2014 13:31:22 +0200
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>
---
kernel/events/core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 67e3b9c..4799676 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)
goto got_name;
} else {
+ if (vma->vm_ops && vma->vm_ops->name) {
+ name = (char *) vma->vm_ops->name(vma);
+ if (name)
+ goto cpy_name;
+ }
+
name = (char *)arch_vma_name(vma);
if (name)
goto cpy_name;
prev parent reply other threads:[~2014-07-16 19:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 15:57 [PATCH] perf: Add vm_ops->name call for mmap event name retrieval Jiri Olsa
2014-07-14 16:09 ` Peter Zijlstra
2014-07-14 16:13 ` Peter Zijlstra
2014-07-14 16:14 ` Andy Lutomirski
2014-07-14 16:17 ` Peter Zijlstra
2014-07-14 16:29 ` Andy Lutomirski
2014-07-14 16:34 ` Peter Zijlstra
2014-07-14 17:37 ` Jiri Olsa
2014-07-14 18:18 ` Peter Zijlstra
2014-07-16 19:21 ` tip-bot for Jiri Olsa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-fbe26abe118ee1262b4ab0d12fefd42647eaea35@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@kernel.org \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox