From: Daniel Vetter Date: Mon, 13 Jun 2011 20:02:52 +0000 (+0200) Subject: gem_stress: some stats about incoherencies X-Git-Tag: 1.1~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=336f85dafb6b11f24353544e12d4ddd7f1c10a73;p=profile%2Fextras%2Fintel-gpu-tools.git gem_stress: some stats about incoherencies Signed-off-by: Daniel Vetter --- diff --git a/tests/gem_stress.c b/tests/gem_stress.c index 5aa4d40..3bc538a 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -95,6 +95,11 @@ static unsigned num_total_tiles = 0; int fence_storm = 0; static int gpu_busy_load = 10; +struct { + unsigned num_failed; + unsigned max_failed_reads; +} stats; + static void tile2xy(struct scratch_buf *buf, unsigned tile, unsigned *x, unsigned *y) { assert(tile < buf->num_tiles); @@ -193,7 +198,7 @@ static void cpucpy2d(uint32_t *src, unsigned src_stride, unsigned src_x, unsigne logical_tile_no, i*options.tile_size + j, tmp, expect, (int) tmp - expect); if (options.trace_tile >= 0 && options.fail) exit(1); - failed = 1; + failed++; } /* when not aborting, correct any errors */ dst[dst_ofs] = expect; @@ -201,6 +206,11 @@ static void cpucpy2d(uint32_t *src, unsigned src_stride, unsigned src_x, unsigne } if (failed && options.fail) exit(1); + + if (failed > stats.max_failed_reads) + stats.max_failed_reads = failed; + if (failed) + stats.num_failed++; } static void cpu_copyfunc(struct scratch_buf *src, unsigned src_x, unsigned src_y, @@ -917,6 +927,9 @@ int main(int argc, char **argv) fan_in_and_check(); + fprintf(stderr, "num failed tiles %u, max incoherent bytes %lu\n", + stats.num_failed, stats.max_failed_reads*sizeof(uint32_t)); + intel_batchbuffer_free(batch); drm_intel_bufmgr_destroy(bufmgr);