From 888d12f029674cbb78d5d71e36dd237b913b8b9c Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Tue, 13 Oct 2009 14:57:20 +0200 Subject: [PATCH] --- yaml --- r: 169491 b: refs/heads/master c: f4f0b418188cc7995375acbb54e87c80f21861bd h: refs/heads/master i: 169489: fd40556265e35530ee67119b3e9bb86c402e727a 169487: cf644a8db105b1596be4b0f08d358e150d68c296 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-top.c | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index cf44a84de4d2..9910d1b530d7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cfed95a693e1ea5d08b9c9019bc30e448437ee2f +refs/heads/master: f4f0b418188cc7995375acbb54e87c80f21861bd diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index c0f69e80b2cc..2d8806bac258 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/tools/perf/builtin-top.c @@ -870,8 +870,6 @@ static unsigned int mmap_read_head(struct mmap_data *md) return head; } -struct timeval last_read, this_read; - static void mmap_read_counter(struct mmap_data *md) { unsigned int head = mmap_read_head(md); @@ -879,8 +877,6 @@ static void mmap_read_counter(struct mmap_data *md) unsigned char *data = md->base + page_size; int diff; - gettimeofday(&this_read, NULL); - /* * If we're further behind than half the buffer, there's a chance * the writer will bite our tail and mess up the samples under us. @@ -891,14 +887,7 @@ static void mmap_read_counter(struct mmap_data *md) */ diff = head - old; if (diff > md->mask / 2 || diff < 0) { - struct timeval iv; - unsigned long msecs; - - timersub(&this_read, &last_read, &iv); - msecs = iv.tv_sec*1000 + iv.tv_usec/1000; - - fprintf(stderr, "WARNING: failed to keep up with mmap data." - " Last read %lu msecs ago.\n", msecs); + fprintf(stderr, "WARNING: failed to keep up with mmap data.\n"); /* * head points to a known good entry, start there. @@ -906,8 +895,6 @@ static void mmap_read_counter(struct mmap_data *md) old = head; } - last_read = this_read; - for (; old != head;) { event_t *event = (event_t *)&data[old & md->mask];