diff options
author | Samuel Pitoiset <[email protected]> | 2017-01-23 21:44:45 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-01-25 15:19:21 +0100 |
commit | cff199ceb7c68db51efc85f34cd45ccede790d4a (patch) | |
tree | a1e2b3390ab294abbeb2a8237c0276c657f567cd /src/gallium/drivers/radeon/r600_query.c | |
parent | 56495080ed910c8fb7cd02aa5e3b14e0fb823c6d (diff) |
gallium/radeon: add a new HUD query for the number of mapped buffers
Useful when debugging applications which map a ton of buffers
and also because we used to run into Linux's limit on the number
of simultaneous mmap() calls.
v2: - update the commit message
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_query.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 25e7f5bb23f..96157cd40e4 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -65,6 +65,7 @@ static enum radeon_value_id winsys_id_from_type(unsigned type) case R600_QUERY_MAPPED_VRAM: return RADEON_MAPPED_VRAM; case R600_QUERY_MAPPED_GTT: return RADEON_MAPPED_GTT; case R600_QUERY_BUFFER_WAIT_TIME: return RADEON_BUFFER_WAIT_TIME_NS; + case R600_QUERY_NUM_MAPPED_BUFFERS: return RADEON_NUM_MAPPED_BUFFERS; case R600_QUERY_NUM_GFX_IBS: return RADEON_NUM_GFX_IBS; case R600_QUERY_NUM_SDMA_IBS: return RADEON_NUM_SDMA_IBS; case R600_QUERY_NUM_BYTES_MOVED: return RADEON_NUM_BYTES_MOVED; @@ -133,6 +134,7 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, case R600_QUERY_CURRENT_GPU_SCLK: case R600_QUERY_CURRENT_GPU_MCLK: case R600_QUERY_BACK_BUFFER_PS_DRAW_RATIO: + case R600_QUERY_NUM_MAPPED_BUFFERS: query->begin_result = 0; break; case R600_QUERY_BUFFER_WAIT_TIME: @@ -241,6 +243,7 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, case R600_QUERY_CURRENT_GPU_SCLK: case R600_QUERY_CURRENT_GPU_MCLK: case R600_QUERY_BUFFER_WAIT_TIME: + case R600_QUERY_NUM_MAPPED_BUFFERS: case R600_QUERY_NUM_GFX_IBS: case R600_QUERY_NUM_SDMA_IBS: case R600_QUERY_NUM_BYTES_MOVED: @@ -1722,6 +1725,7 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("mapped-VRAM", MAPPED_VRAM, BYTES, AVERAGE), X("mapped-GTT", MAPPED_GTT, BYTES, AVERAGE), X("buffer-wait-time", BUFFER_WAIT_TIME, MICROSECONDS, CUMULATIVE), + X("num-mapped-buffers", NUM_MAPPED_BUFFERS, UINT64, AVERAGE), X("num-GFX-IBs", NUM_GFX_IBS, UINT64, AVERAGE), X("num-SDMA-IBs", NUM_SDMA_IBS, UINT64, AVERAGE), X("num-bytes-moved", NUM_BYTES_MOVED, BYTES, CUMULATIVE), |