From: Stephane Eranian Date: Thu, 24 Jan 2013 15:10:37 +0000 (+0100) Subject: perf record: Add support for mem access profiling X-Git-Tag: v3.12-rc1~982^2~15^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccf49bfc6bb1025788637417780e9f1eeae9fc37;p=kernel%2Fkernel-generic.git perf record: Add support for mem access profiling We use the -W option to obtain the cost of the memory accesses. Data address sampling is obtained via the -d option. Signed-off-by: Stephane Eranian Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1359040242-8269-14-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 5c4ca51..07b1a3a 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -554,6 +554,9 @@ void perf_evsel__config(struct perf_evsel *evsel, perf_evsel__set_sample_bit(evsel, CPU); } + if (opts->sample_address) + attr->sample_type |= PERF_SAMPLE_DATA_SRC; + if (opts->no_delay) { attr->watermark = 0; attr->wakeup_events = 1;