radeonsi: implement AMD_performance_monitor for CIK+
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 25 Nov 2015 14:30:03 +0000 (15:30 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 25 Nov 2015 14:52:09 +0000 (15:52 +0100)
commitad22006892c5511dac7d0d680633a1b857da49fb
tree46c64acd6d362d3ca3060787f1549e850561cb5d
parentb9fc01aee75dcc2d56750ea430e32d74127faf69
radeonsi: implement AMD_performance_monitor for CIK+

Expose most of the performance counter groups that are exposed by Catalyst.
Ideally, the driver will work with GPUPerfStudio at some point, but we are not
quite there yet. In any case, this is the reason for grouping multiple
instances of hardware blocks in the way it is implemented.

The counters can also be shown using the Gallium HUD. If one is interested to
see how work is distributed across multiple shader engines, one can set the
environment variable RADEON_PC_SEPARATE_SE=1 to obtain finer-grained performance
counter groups.

Part of the implementation is in radeon because an implementation for
older hardware would largely follow along the same lines, but exposing
a different set of blocks which are programmed slightly differently.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/Makefile.sources
src/gallium/drivers/radeon/r600_perfcounter.c [new file with mode: 0644]
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeon/r600_query.c
src/gallium/drivers/radeon/r600_query.h
src/gallium/drivers/radeonsi/Makefile.sources
src/gallium/drivers/radeonsi/si_perfcounter.c [new file with mode: 0644]
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h