diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-10 21:45:22 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-11 02:39:01 +0200 |
commit | ea1900e571d40a3ce60c835c2f21e1fd8c5cb663 (patch) | |
tree | aca5108ea57e89626e0796f3285985e6a1512f9a /tools/perf/builtin-record.c | |
parent | 66fff22483d8542dfb4d61a28d21277bbde321e8 (diff) |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index c10553c3460..919f23ca419 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; } |