aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2010-05-18 10:30:49 -0400
committerIngo Molnar <mingo@elte.hu>2010-06-09 05:12:34 -0400
commit3af9e859281bda7eb7c20b51879cf43aa788ac2e (patch)
treecddb7fc788abc826551e12bba5892c6b26942392 /tools/perf/builtin-record.c
parent8ed92280be013180e24c84456ab6babcb07037cc (diff)
perf: Add non-exec mmap() tracking
Add the capacility to track data mmap()s. This can be used together with PERF_SAMPLE_ADDR for data profiling. Signed-off-by: Anton Blanchard <anton@samba.org> [Updated code for stable perf ABI] Signed-off-by: Eric B Munson <ebmunson@us.ibm.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1274193049-25997-1-git-send-email-ebmunson@us.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 5e5c6403a315..39c7247bc54a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -268,8 +268,10 @@ static void create_counter(int counter, int cpu)
268 if (inherit_stat) 268 if (inherit_stat)
269 attr->inherit_stat = 1; 269 attr->inherit_stat = 1;
270 270
271 if (sample_address) 271 if (sample_address) {
272 attr->sample_type |= PERF_SAMPLE_ADDR; 272 attr->sample_type |= PERF_SAMPLE_ADDR;
273 attr->mmap_data = track;
274 }
273 275
274 if (call_graph) 276 if (call_graph)
275 attr->sample_type |= PERF_SAMPLE_CALLCHAIN; 277 attr->sample_type |= PERF_SAMPLE_CALLCHAIN;