lkml.org 
[lkml]   [2014]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] perf: Add vm_ops->name call for mmap event name retrieval
On Mon, Jul 14, 2014 at 9:09 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, Jul 14, 2014 at 05:57:19PM +0200, Jiri Olsa wrote:
>> Following patch added another way to get mmap name:
>> 78d683e mm, fs: Add vm_ops->name as an alternative to arch_vma_name
>
> Please add to your .gitconfig:
>
> [core]
> abbrev = 12
>
> Also, you failed to CC the two people involved in that.
>
>> 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!
>>
>> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
>> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
>> Cc: David Ahern <dsahern@gmail.com>
>> Cc: Frederic Weisbecker <fweisbec@gmail.com>
>> Cc: Ingo Molnar <mingo@kernel.org>
>> Cc: Namhyung Kim <namhyung@kernel.org>
>> Cc: Paul Mackerras <paulus@samba.org>
>> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> Signed-off-by: Jiri Olsa <jolsa@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;
>> + }
>> +

Looks good to me. Sorry I missed that.

--Andy



>> name = (char *)arch_vma_name(vma);
>> if (name)
>> goto cpy_name;
>> --
>> 1.8.3.1
>>



--
Andy Lutomirski
AMA Capital Management, LLC


\
 
 \ /
  Last update: 2014-07-14 19:01    [W:0.164 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site