iris/perf: implement routines to return counter info
With this commit, Iris will report that AMD_performance_monitor is
supported, and will allow the caller to query the available metrics.
Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Contributor
Hi
I've bisected back to this commit, when I launch Steam it segfaults when it's built with -O3 and LTO
Building with just -O3 works around the issue too
steam[1804860]: segfault at 0 ip 00000000f6371b97 sp 00000000fff096c0 error 6 in iris_dri.so[f5cf7000+1134000]
-
Contributor
Neither 661be3fe or 0f3768bc fixes things for me here
I tried reverting 0fd43597 but got a build failure
../mesa-9999/src/gallium/drivers/iris/iris_query.c:46:10: fatal error: iris_monitor.h: No such file or directory 46 | #include "iris_monitor.h" | ^~~~~~~~~~~~~~~~
This is what I'm building with:
meson --buildtype plain --libdir lib --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload --cross-file /var/tmp/portage/media-libs/mesa-9999/temp/meson.i686-pc-linux-gnu.x86 -Dplatforms=surfaceless,x11,wayland,drm -Dllvm=true -Dlmsensors=true -Dlibunwind=false -Dgallium-nine=true -Dgallium-va=true -Dva-libs-path=/usr/lib/va/drivers -Dgallium-vdpau=true -Dgallium-xa=false -Dgallium-xvmc=false -Dgallium-opencl=disabled -Dglx-read-only-text=false -Dosmesa=none -Dbuild-tests=false -Dglx=dri -Dshared-glapi=true -Ddri3=true -Degl=true -Dgbm=true -Dgles1=false -Dgles2=true -Dglvnd=false -Dselinux=false -Dvalgrind=false -Ddri-drivers= -Dgallium-drivers=iris,radeonsi,swrast -Dvulkan-drivers=amd,intel -Dvulkan-overlay-layer=true --buildtype plain -Db_ndebug=true /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999 /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86
The Meson build system Version: 0.51.1 Source dir: /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999 Build dir: /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86 Build type: cross build Program python found: YES (/var/tmp/portage/media-libs/mesa-9999/temp/python3.7/bin/python) Project name: mesa Project version: 19.2.0-devel Appending CFLAGS from environment: '-O3 -march=native -pipe -flto=8' Appending LDFLAGS from environment: '-O3 -march=native -pipe -flto=8 -Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--build-id=sha1' C compiler for the build machine: x86_64-pc-linux-gnu-gcc -m32 (gcc 9.1.0 "x86_64-pc-linux-gnu-gcc (Gentoo 9.1.0-r1 p1.1) 9.1.0") Appending CXXFLAGS from environment: '-O3 -march=native -pipe -flto=8' Appending LDFLAGS from environment: '-O3 -march=native -pipe -flto=8 -Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--build-id=sha1' C++ compiler for the build machine: x86_64-pc-linux-gnu-g++ -m32 (gcc 9.1.0 "x86_64-pc-linux-gnu-g++ (Gentoo 9.1.0-r1 p1.1) 9.1.0") C compiler for the host machine: x86_64-pc-linux-gnu-gcc -m32 (gcc 9.1.0 "x86_64-pc-linux-gnu-gcc (Gentoo 9.1.0-r1 p1.1) 9.1.0") WARNING: Env var AR seems to point to the cross compiler. This is probably wrong, it should always point to the native compiler.
-
Contributor
I got a backtrace from gdb:
Thread 1 "steam" received signal SIGSEGV, Segmentation fault. 0xf632d4ad in ralloc_steal () from /usr/lib/dri/iris_dri.so (gdb) bt #0 0xf632d4ad in ralloc_steal () from /usr/lib/dri/iris_dri.so #1 0xf63efe93 in steal_memory(ir_instruction*, void*) [clone .lto_priv.0] () from /usr/lib/dri/iris_dri.so #2 0xf63ee7ca in ir_hierarchical_visitor::visit_enter(ir_function*) () from /usr/lib/dri/iris_dri.so #3 0xf63ee0b1 in ir_function::accept(ir_hierarchical_visitor*) () from /usr/lib/dri/iris_dri.so #4 0xf6678787 in _mesa_get_fixed_func_fragment_program () from /usr/lib/dri/iris_dri.so #5 0xf675c65b in update_program () from /usr/lib/dri/iris_dri.so #6 0xf6772b2f in _mesa_update_state_locked () from /usr/lib/dri/iris_dri.so #7 0xf6773237 in _mesa_update_state () from /usr/lib/dri/iris_dri.so #8 0xf6497467 in _mesa_Clear () from /usr/lib/dri/iris_dri.so #9 0xed1ae806 in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/vgui2_s.so #10 0xed1bd4ed in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/vgui2_s.so #11 0xf054bc6d in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/steamui.so #12 0xf054bef5 in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/steamui.so #13 0xf053e28f in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/steamui.so #14 0xf0491eaa in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/steamui.so #15 0xf0493c2e in ?? () from /home/fireburn/.local/share/Steam/ubuntu12_32/steamui.so #16 0x5658e1b0 in RunSteam(int, char**, bool) () #17 0x5658f0ab in ?? () #18 0x5657a06c in ?? () #19 0xf78a5021 in __libc_start_main () from /lib/libc.so.6 #20 0x5657dd29 in _start ()
-
mentioned in commit rellla/mesa@728ebcde
-
mentioned in issue #1358 (closed)