diff options
| author | Stephane Eranian <eranian@google.com> | 2013-01-24 16:10:39 +0100 | 
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-04-01 12:19:02 -0300 | 
| commit | 2fe85427e3bf65d791700d065132772fc26e4d75 (patch) | |
| tree | 8561cc61ebf26c519dec1ea0340e5af295632ebb /kernel | |
| parent | 9ad64c0f481c37a63dd39842a0fd264bee44a097 (diff) | |
| download | olio-linux-3.10-2fe85427e3bf65d791700d065132772fc26e4d75.tar.xz olio-linux-3.10-2fe85427e3bf65d791700d065132772fc26e4d75.zip  | |
perf: Add PERF_RECORD_MISC_MMAP_DATA to RECORD_MMAP
Type of mapping was lost and made it hard for a tool
to distinguish code vs. data mmaps. Perf has the ability
to distinguish the two.
Use a bit in the header->misc bitmask to keep track of
the mmap type. If PERF_RECORD_MISC_MMAP_DATA is set then
the mapping is not executable (!VM_EXEC). If not set, then
the mapping is executable.
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: peterz@infradead.org
Cc: ak@linux.intel.com
Cc: acme@redhat.com
Cc: jolsa@redhat.com
Cc: namhyung.kim@lge.com
Link: http://lkml.kernel.org/r/1359040242-8269-16-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/events/core.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 77c96d18c23..98c0845fcd2 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -4791,6 +4791,9 @@ got_name:  	mmap_event->file_name = name;  	mmap_event->file_size = size; +	if (!(vma->vm_flags & VM_EXEC)) +		mmap_event->event_id.header.misc |= PERF_RECORD_MISC_MMAP_DATA; +  	mmap_event->event_id.header.size = sizeof(mmap_event->event_id) + size;  	rcu_read_lock();  |