diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-10 09:03:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-10 10:55:26 -0400 |
commit | 4502d77c1d8f15f20c04b92cb96c12d4e465de29 (patch) | |
tree | a08bc1c29e3ed1fd04c354e30019f243e82a4d32 /tools/perf/builtin-report.c | |
parent | bd2b5b12849a3446abad0b25e920f86f5480b309 (diff) |
perf_counter tools: Small frequency related fixes
Create the counter in a disabled state and only enable it after we
mmap() the buffer, this allows us to see the first few samples (and
observe the frequency ramp).
Furthermore, print the period in the verbose report.
Signed-off-by: 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-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 0b18cb99a858..9a0e31e79e9d 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -47,6 +47,7 @@ struct ip_event { | |||
47 | struct perf_event_header header; | 47 | struct perf_event_header header; |
48 | __u64 ip; | 48 | __u64 ip; |
49 | __u32 pid, tid; | 49 | __u32 pid, tid; |
50 | __u64 period; | ||
50 | }; | 51 | }; |
51 | 52 | ||
52 | struct mmap_event { | 53 | struct mmap_event { |
@@ -943,12 +944,13 @@ process_overflow_event(event_t *event, unsigned long offset, unsigned long head) | |||
943 | uint64_t ip = event->ip.ip; | 944 | uint64_t ip = event->ip.ip; |
944 | struct map *map = NULL; | 945 | struct map *map = NULL; |
945 | 946 | ||
946 | dprintf("%p [%p]: PERF_EVENT (IP, %d): %d: %p\n", | 947 | dprintf("%p [%p]: PERF_EVENT (IP, %d): %d: %p period: %Ld\n", |
947 | (void *)(offset + head), | 948 | (void *)(offset + head), |
948 | (void *)(long)(event->header.size), | 949 | (void *)(long)(event->header.size), |
949 | event->header.misc, | 950 | event->header.misc, |
950 | event->ip.pid, | 951 | event->ip.pid, |
951 | (void *)(long)ip); | 952 | (void *)(long)ip, |
953 | (long long)event->ip.period); | ||
952 | 954 | ||
953 | dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid); | 955 | dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid); |
954 | 956 | ||