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

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
113 jobs for !10666 with review/v3d-perf-counters in 8 seconds (queued for 4 seconds)
detached
Status Job ID Name Coverage
  Sanity
passed #9761778
sanity

00:00:08

 
  Container
manual #9761781
aarch64 manual
arm_build
manual #9761782
windows shell 1809 mesa manual
windows_build_vs2019
manual #9761779
manual
x86_build-base
manual #9761780
manual
x86_test-base
 
  Container 2
created #9761787
android_build
created #9761784
i386_build
created #9761790
kernel+rootfs_amd64
created #9761791
aarch64
kernel+rootfs_arm64
created #9761792
aarch64
kernel+rootfs_armhf
created #9761785
ppc64el_build
created #9761786
s390x_build
created #9761783
x86_build
created #9761788
x86_test-gl
created #9761789
x86_test-vk
 
  Meson X86 64
created #9761798
meson-clang
created #9761799
meson-clover
created #9761795
meson-clover-testing
created #9761796
meson-gallium
created #9761797
meson-release
created #9761793
meson-testing
created #9761794
meson-testing-asan
created #9761800
meson-vulkan
 
  Build Misc
created #9761801
arm_test
created #9761802
meson-android
created #9761804
aarch64
meson-arm64
created #9761805
aarch64
meson-arm64-asan
created #9761806
aarch64
meson-arm64-build-test
created #9761803
aarch64
meson-armhf
created #9761808
meson-i386
created #9761811
meson-mingw32-x86_64
created #9761810
meson-ppc64el
created #9761809
kvm
meson-s390x
created #9761807
docker 1809 mesa windows
meson-windows-vs2019
 
  Amd
created #9761812
radv-fossils
 
  Broadcom
created #9761823
igalia-rpi4
v3d-rpi4-gles2:armhf
created #9761817
igalia-rpi4
v3d-rpi4-gles31:armhf 1/2
created #9761818
igalia-rpi4
v3d-rpi4-gles31:armhf 2/2
created #9761819
igalia-rpi4
v3d-rpi4-gles3:armhf 1/4
created #9761820
igalia-rpi4
v3d-rpi4-gles3:armhf 2/4
created #9761821
igalia-rpi4
v3d-rpi4-gles3:armhf 3/4
created #9761822
igalia-rpi4
v3d-rpi4-gles3:armhf 4/4
created #9761824
igalia-rpi4
v3dv-rpi4-vk:armhf 1/6
created #9761825
igalia-rpi4
v3dv-rpi4-vk:armhf 2/6
created #9761826
igalia-rpi4
v3dv-rpi4-vk:armhf 3/6
created #9761827
igalia-rpi4
v3dv-rpi4-vk:armhf 4/6
created #9761828
igalia-rpi4
v3dv-rpi4-vk:armhf 5/6
created #9761829
igalia-rpi4
v3dv-rpi4-vk:armhf 6/6
created #9761813
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4
created #9761814
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4
created #9761815
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4
created #9761816
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4
 
  Freedreno
created #9761830
google-freedreno-db410c
a306_gles2
created #9761831
google-freedreno-db410c
a306_gles3 1/3
created #9761832
google-freedreno-db410c
a306_gles3 2/3
created #9761833
google-freedreno-db410c
a306_gles3 3/3
created #9761834
google-freedreno-db410c
a306_gles3_options
created #9761835
google-freedreno-db410c
a306-traces
created #9761836
google-freedreno-db820c
a530_gles2
created #9761839
google-freedreno-db820c
a530_gles31 1/2
created #9761837
google-freedreno-db820c
a530_gles3 1/2
created #9761840
google-freedreno-db820c
a530_gles31 2/2
created #9761838
google-freedreno-db820c
a530_gles3 2/2
created #9761841
google-freedreno-db820c
a530_piglit_gl
created #9761842
google-freedreno-db820c
a530_piglit_shader
created #9761843
google-freedreno-db820c
a530-traces
created #9761848
google-freedreno-cheza
a630_egl
created #9761847
google-freedreno-cheza
a630_gl
created #9761844
google-freedreno-cheza
a630_gles2
created #9761846
google-freedreno-cheza
a630_gles3
created #9761845
google-freedreno-cheza
a630_gles31
created #9761849
google-freedreno-cheza
a630_gles_others
created #9761853
google-freedreno-cheza
a630_piglit
created #9761854
google-freedreno-cheza
a630-traces
created #9761850
google-freedreno-cheza
a630_vk 1/2
created #9761851
google-freedreno-cheza
a630_vk 2/2
created #9761852
google-freedreno-cheza
a630_vk_sysmem
 
  Software Renderer
created #9761877
lavapipe-nir-stress
created #9761876
lavapipe-vk
created #9761865
llvmpipe-egl
created #9761863
llvmpipe-gl
created #9761860
llvmpipe-gles2
created #9761861
llvmpipe-gles3
created #9761862
llvmpipe-gles31
created #9761864
llvmpipe-khr-gles2
created #9761855
llvmpipe-piglit-cl
created #9761857
llvmpipe-piglit-glslparser
created #9761856
llvmpipe-piglit-quick_gl
created #9761858
llvmpipe-piglit-quick_shader
created #9761859
llvmpipe-traces
created #9761873
softpipe-asan-gles31
created #9761875
softpipe-gl
created #9761866
softpipe-gles2
created #9761867
softpipe-gles3
created #9761868
softpipe-gles31 1/2
created #9761869
softpipe-gles31 2/2
created #9761870
softpipe-khr-gles2
created #9761871
softpipe-khr-gles3
created #9761872
softpipe-khr-gles31
created #9761874
softpipe-piglit-quick
 
  Layered Backends
created #9761890
windows docker 1809 mesa
test-d3d12-windows
created #9761882
virgl-gl30-on-gl
created #9761883
virgl-gl31-on-gl
created #9761884
virgl-gl32-on-gl
created #9761878
virgl-gles2-on-gl
created #9761880
virgl-gles31-on-gl 1/2
created #9761881
virgl-gles31-on-gl 2/2
created #9761879
virgl-gles3-on-gl
created #9761885
virgl-traces
created #9761889
zink-lvp-gl
created #9761887
zink-lvp-gles2
created #9761888
zink-lvp-gles3
created #9761886
zink-piglit-quick_gl