diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-17 18:09:40 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-17 18:09:40 +0100 |
commit | 3e430a8b01ae13bac878863663bd3e2efd995c6d (patch) | |
tree | 786ec9e723be0c26e5021a4717a6547acd17c892 /overlay/gpu-perf.c | |
parent | cc45a9a3dbbaa51a480c56bea53c1803dbd1859f (diff) |
overlay: Fix wraparound handling of perf ringbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/gpu-perf.c')
-rw-r--r-- | overlay/gpu-perf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c index d2f09f55..77511323 100644 --- a/overlay/gpu-perf.c +++ b/overlay/gpu-perf.c @@ -226,7 +226,7 @@ int gpu_perf_update(struct gpu_perf *gp) rmb(); if (head < tail) - tail = head; /* XXX */ + head += size; data = (uint8_t *)mmap + gp->page_size; while (head - tail >= sizeof (struct perf_event_header)) { @@ -262,7 +262,7 @@ int gpu_perf_update(struct gpu_perf *gp) tail += header->size; } - mmap->data_tail = tail; + mmap->data_tail = tail & mask; } free(buffer); |