diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-10 15:45:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-10 20:39:01 -0400 |
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 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) | |||
350 | struct perf_counter_attr *attr = attrs + counter; | 350 | struct perf_counter_attr *attr = attrs + counter; |
351 | int track = 1; | 351 | int track = 1; |
352 | 352 | ||
353 | attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_PERIOD; | 353 | attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID; |
354 | if (freq) { | 354 | if (freq) { |
355 | attr->sample_type |= PERF_SAMPLE_PERIOD; | ||
355 | attr->freq = 1; | 356 | attr->freq = 1; |
356 | attr->sample_freq = freq; | 357 | attr->sample_freq = freq; |
357 | } | 358 | } |