aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-10 21:45:22 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-11 02:39:01 +0200
commitea1900e571d40a3ce60c835c2f21e1fd8c5cb663 (patch)
treeaca5108ea57e89626e0796f3285985e6a1512f9a /tools/perf/builtin-record.c
parentperf_counter: Annotate exit ctx recursion (diff)
downloadlinux-dev-ea1900e571d40a3ce60c835c2f21e1fd8c5cb663.tar.xz
linux-dev-ea1900e571d40a3ce60c835c2f21e1fd8c5cb663.zip
perf_counter tools: Normalize data using per sample period data
When we use variable period sampling, add the period to the sample data and use that to normalize the samples. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index c10553c3460f..919f23ca4199 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -350,8 +350,9 @@ static void create_counter(int counter, int cpu, pid_t pid)
struct perf_counter_attr *attr = attrs + counter;
int track = 1;
- attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_PERIOD;
+ attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID;
if (freq) {
+ attr->sample_type |= PERF_SAMPLE_PERIOD;
attr->freq = 1;
attr->sample_freq = freq;
}