v3d/simulator: implement performance counters
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 27 Apr 2021 16:11:18 +0000 (18:11 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 3 Aug 2021 08:33:52 +0000 (08:33 +0000)
commit4f7043fc0ce158a5f555b6c0ec7f9818a60b8ce4
tree591ea6e34c33e097400bcfb7bb369729731052f3
parent685281278ebd39114c3007e76443eaaa66cf8335
v3d/simulator: implement performance counters

Add support for performance counters when using the simulator.

v2 (Iago):
 - Remove brackets from single-line conditionals
 - Rename channel to channels
 - Ensure perfmon start/stop function is implemented in all versions
 - Use an array for perfmons instead of hash table
 - Implement performance counters in CSD

v3 (Iago):
 - Rename PERFMON_CHUNKS to PERFMONS_ALLOC_SIZE.
 - Merge increasing lastid and ensuring space in a single function.

v4 (Iago):
 - Assert perfid <= perfmons_size.

v7 (Iago):
 - Do not stop perfmon on each submission

v8 (Iago):
 - Add comment about stopping the perfmon when retrieving values.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666>
src/broadcom/simulator/v3d_simulator.c
src/broadcom/simulator/v3dx_simulator.c
src/broadcom/simulator/v3dx_simulator.h