aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-25 05:27:12 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-25 15:39:08 -0400
commite6e18ec79b023d5fe84226cef533cf0e3770ce93 (patch)
tree6fc1bd9afd21454864abe2aec6a0e35e17d47f04 /tools/perf/builtin-annotate.c
parentbfbd3381e63aa2a14c6706afb50ce4630aa0d9a2 (diff)
perf_counter: Rework the sample ABI
The PERF_EVENT_READ implementation made me realize we don't actually need the sample_type int the output sample, since we already have that in the perf_counter_attr information. Therefore, remove the PERF_EVENT_MISC_OVERFLOW bit and the event->type overloading, and imply put counter overflow samples in a PERF_EVENT_SAMPLE type. This also fixes the issue that event->type was only 32-bit and sample_type had 64 usable bits. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 7e58e3ad1508..722c0f54e549 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -855,7 +855,7 @@ static unsigned long total = 0,
855 total_unknown = 0; 855 total_unknown = 0;
856 856
857static int 857static int
858process_overflow_event(event_t *event, unsigned long offset, unsigned long head) 858process_sample_event(event_t *event, unsigned long offset, unsigned long head)
859{ 859{
860 char level; 860 char level;
861 int show = 0; 861 int show = 0;
@@ -1013,10 +1013,10 @@ process_period_event(event_t *event, unsigned long offset, unsigned long head)
1013static int 1013static int
1014process_event(event_t *event, unsigned long offset, unsigned long head) 1014process_event(event_t *event, unsigned long offset, unsigned long head)
1015{ 1015{
1016 if (event->header.misc & PERF_EVENT_MISC_OVERFLOW)
1017 return process_overflow_event(event, offset, head);
1018
1019 switch (event->header.type) { 1016 switch (event->header.type) {
1017 case PERF_EVENT_SAMPLE:
1018 return process_sample_event(event, offset, head);
1019
1020 case PERF_EVENT_MMAP: 1020 case PERF_EVENT_MMAP:
1021 return process_mmap_event(event, offset, head); 1021 return process_mmap_event(event, offset, head);
1022 1022