perf record: No need to check for overwrites
[deliverable/linux.git] / tools / perf / builtin-record.c
index d7886307f6f46b425d68c7c2f08059724d4de4df..caf927978d929de4c3bcc5cb1dcb2730c15b355d 100644 (file)
@@ -115,27 +115,11 @@ static void mmap_read(struct perf_mmap *md)
        unsigned char *data = md->base + page_size;
        unsigned long size;
        void *buf;
-       int diff;
 
-       /*
-        * 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.
-        *
-        * If we somehow ended up ahead of the head, we got messed up.
-        *
-        * In either case, truncate and restart at head.
-        */
-       diff = head - old;
-       if (diff < 0) {
-               fprintf(stderr, "WARNING: failed to keep up with mmap data\n");
-               /*
-                * head points to a known good entry, start there.
-                */
-               old = head;
-       }
+       if (old == head)
+               return;
 
-       if (old != head)
-               samples++;
+       samples++;
 
        size = head - old;
 
This page took 0.061139 seconds and 5 git commands to generate.