[PATCH 4/9] perf_counter: kerneltop: keep up with ABI changes

From: Peter Zijlstra
Date: Wed Apr 08 2009 - 09:05:46 EST


Update kerneltop to use PERF_EVENT_MISC_OVERFLOW

Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
---
Documentation/perf_counter/kerneltop.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

Index: linux-2.6/Documentation/perf_counter/kerneltop.c
===================================================================
--- linux-2.6.orig/Documentation/perf_counter/kerneltop.c
+++ linux-2.6/Documentation/perf_counter/kerneltop.c
@@ -1276,22 +1276,22 @@ static void mmap_read(struct mmap_data *

old += size;

- switch (event->header.type) {
- case PERF_EVENT_COUNTER_OVERFLOW | __PERF_EVENT_IP:
- case PERF_EVENT_COUNTER_OVERFLOW | __PERF_EVENT_IP | __PERF_EVENT_TID:
- process_event(event->ip.ip, md->counter);
- break;
-
- case PERF_EVENT_MMAP:
- case PERF_EVENT_MUNMAP:
- printf("%s: %Lu %Lu %Lu %s\n",
- event->header.type == PERF_EVENT_MMAP
- ? "mmap" : "munmap",
- event->mmap.start,
- event->mmap.len,
- event->mmap.pgoff,
- event->mmap.filename);
- break;
+ if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) {
+ if (event->header.type & PERF_RECORD_IP)
+ process_event(event->ip.ip, md->counter);
+ } else {
+ switch (event->header.type) {
+ case PERF_EVENT_MMAP:
+ case PERF_EVENT_MUNMAP:
+ printf("%s: %Lu %Lu %Lu %s\n",
+ event->header.type == PERF_EVENT_MMAP
+ ? "mmap" : "munmap",
+ event->mmap.start,
+ event->mmap.len,
+ event->mmap.pgoff,
+ event->mmap.filename);
+ break;
+ }
}
}


--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/