gem_fence_upload: Improve the contended messages
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 21 Jun 2014 14:38:31 +0000 (15:38 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 21 Jun 2014 14:40:25 +0000 (15:40 +0100)
In the contended upload case, we did not distinguish between linear and
tiled uploads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/gem_fence_upload.c

index ed712c1..88da5dc 100644 (file)
@@ -259,6 +259,7 @@ static void *no_contention(void *closure)
 
        for (n = 0; n < t->loops; n++) {
                uint32_t *ptr = gem_mmap(t->fd, t->handle, OBJECT_SIZE, PROT_READ | PROT_WRITE);
+               igt_assert(ptr);
                memset(ptr + (rand() % 256) * 4096 / 4, 0, 4096);
                munmap(ptr, OBJECT_SIZE);
        }
@@ -296,7 +297,7 @@ static void thread_contention(void)
                gettimeofday(&end, NULL);
 
                linear[count != 2] = count * loops / elapsed(&start, &end) / (OBJECT_SIZE / 4096);
-               igt_info("Contended upload rate for %d threads: %7.3fMiB/s\n", count, linear[count != 2]);
+               igt_info("Contended upload rate for %d linear threads:  %7.3fMiB/s\n", count, linear[count != 2]);
 
                for (n = 0; n < count; n++)
                        gem_set_tiling(fd, threads[n].handle, I915_TILING_X, 1024);
@@ -309,7 +310,7 @@ static void thread_contention(void)
                gettimeofday(&end, NULL);
 
                tiled[count != 2] = count * loops / elapsed(&start, &end) / (OBJECT_SIZE / 4096);
-               igt_info("Contended upload rate for %d threads: %7.3fMiB/s\n", count, tiled[count != 2]);
+               igt_info("Contended upload rate for %d tiled threads:   %7.3fMiB/s\n", count, tiled[count != 2]);
 
                for (n = 0; n < count; n++) {
                        gem_close(fd, threads[n].handle);