mesa/src/intel/tools
Lionel Landwerlin 36c043e2eb intel: move debug identifier out of libintel_dev
The debug identifier is put into the captured buffers for error
capture. This helps us figure out what version of the driver people
are running when encountering a GPU hang. This identifier has the
git-sha1 + driver name.

libintel_dev is also a dependency of the compiler so any change to the
git-sha1 also triggers recompile which we want to avoid.

This changes moves the debug identifier to src/intel/common which
drivers already depend on, so the compiler is not affected anymore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11136
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29128>
2024-05-11 01:52:01 +00:00
..
imgui treewide: Replace the usage of TRUE/FALSE with true/false 2023-06-27 18:18:28 +08:00
aub_mem.c
aub_mem.h intel/decoder: Move decoder to a separate module 2024-02-16 16:37:31 +00:00
aub_read.c intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
aub_read.h intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
aub_write.c intel: Cleanup duplicate ALIGN macro defines 2024-01-03 12:46:10 +00:00
aub_write.h intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
aubinator.c intel/tools: Add ELK support for aubinator 2024-02-24 00:24:31 +00:00
aubinator_error_decode.c intel: move debug identifier out of libintel_dev 2024-05-11 01:52:01 +00:00
aubinator_error_decode_lib.c intel/tools: Move ascii85_decode_char() to error_decode_lib 2024-04-18 19:12:41 +00:00
aubinator_error_decode_lib.h intel/tools/aubinator_error_decode: Move definition of option_color to header 2024-04-24 17:07:50 +00:00
aubinator_error_decode_xe.c intel/tools: Parse INSTDONE registers in Xe KMD error dump 2024-04-24 17:07:50 +00:00
aubinator_error_decode_xe.h intel/tools: Parse INSTDONE registers in Xe KMD error dump 2024-04-24 17:07:50 +00:00
aubinator_viewer.cpp intel/tools: Add ELK support for aubinator_viewer 2024-02-24 00:24:32 +00:00
aubinator_viewer.h intel/decoder: Move decoder to a separate module 2024-02-16 16:37:31 +00:00
aubinator_viewer_decoder.cpp intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
aubinator_viewer_urb.h
error2aub.c intel/tools: Move ascii85_decode_char() to error_decode_lib 2024-04-18 19:12:41 +00:00
error2hangdump.c intel/tools/error2hangdump: Add Xe KMD support 2024-04-18 19:12:41 +00:00
error2hangdump_lib.c intel/tools/error2hangdump: Move code that will be shared with Xe parser to error2hangdump_lib 2024-04-18 19:12:41 +00:00
error2hangdump_lib.h intel/tools/error2hangdump: Move code that will be shared with Xe parser to error2hangdump_lib 2024-04-18 19:12:41 +00:00
error2hangdump_xe.c intel/tools/error2hangdump: Add Xe KMD support 2024-04-18 19:12:41 +00:00
error2hangdump_xe.h intel/tools/error2hangdump: Add Xe KMD support 2024-04-18 19:12:41 +00:00
error_decode_lib.c intel/tools: Move ascii85_decode_char() to error_decode_lib 2024-04-18 19:12:41 +00:00
error_decode_lib.h intel/tools: Move ascii85_decode_char() to error_decode_lib 2024-04-18 19:12:41 +00:00
error_decode_xe_lib.c intel/tools: Parse INSTDONE registers in Xe KMD error dump 2024-04-24 17:07:50 +00:00
error_decode_xe_lib.h intel/tools: Parse INSTDONE registers in Xe KMD error dump 2024-04-24 17:07:50 +00:00
gfx8_context.h
gfx10_context.h
intel_aub.h
intel_context.h intel: Use ALIGN_POT instead of ALIGN inside macro define 2024-01-03 12:46:10 +00:00
intel_dev_info.c intel/tools: Add extra compiler device sha only for Gfx9+ 2024-02-24 00:24:32 +00:00
intel_dump_gpu.c intel: move debug identifier out of libintel_dev 2024-05-11 01:52:01 +00:00
intel_dump_gpu.in intel/tools: Use 'env bash' to find bash executable 2023-08-03 01:56:40 -07:00
intel_hang_replay.c intel/hang_replay: fix batch address 2024-05-08 22:50:47 +00:00
intel_hang_viewer.cpp intel/tools: Add ELK support for intel_hang_viewer 2024-02-24 00:24:32 +00:00
intel_noop_drm_shim.c intel/tools: load json device info in drm_shim 2024-02-13 19:38:36 +00:00
intel_sanitize_gpu.c intel/tools: avoid invalid time and file bits combination 2024-03-08 21:01:38 +00:00
intel_sanitize_gpu.in intel/tools: Use 'env bash' to find bash executable 2023-08-03 01:56:40 -07:00
intel_stub_gpu.in intel/tools: Make intel_stub_gpu work when using meson devenv 2024-03-15 03:25:46 +00:00
meson.build intel/tools/error2hangdump: Add Xe KMD support 2024-04-18 19:12:41 +00:00
README.md intel/tools: add README file 2024-05-08 22:50:47 +00:00

aubinator_error_decode

This tool allows decode an error state dump generated by the kernel driver.

Make a copy of the error state file (i915) :

$ sudo cp /sys/devices/pci0000:00/0000:00:02.0/drm/card0/error /tmp/error
$ sudo chmod go+rw /tmp/error

Make a copy of the error state file (Xe) :

$ sudo cp /sys/class/drm/card0/device/devcoredump/data /tmp/error
$ sudo chmod go+rw /tmp/error

Then visualize the error state (from the mesa build directory) :

$ ./src/intel/tools/aubinator_error_decode /tmp/error

intel_stub_gpu

This tool allows faking a particular device at the ioctl level. This is useful to test compiler changes (using shader-db/fossils-db replays) across a number of device you don't necessarily have access too.

Faking a DG2 device :

$ intel_stub_gpu -p dg2 fossilize-replay /path/to/fossilize.foz --enable-pipeline-stats /tmp/dg2.csv

Faking a ICL device :

$ intel_stub_gpu -p icl fossilize-replay /path/to/fossilize.foz --enable-pipeline-stats /tmp/icl.csv

intel_error2hangdump

This tool converts an error state dump into an uncompressed/easy-to-modify binary file (format described in src/intel/common/intel_hang_dump.h).

Capture the error state (i915) :

$ sudo cp /sys/devices/pci0000:00/0000:00:02.0/drm/card0/error /tmp/error
$ sudo chmod go+rw /tmp/error

Capture the error state (Xe) :

$ sudo cp /sys/class/drm/card0/device/devcoredump/data /tmp/error
$ sudo chmod go+rw /tmp/error

Convert an error state (from the mesa build directory) :

$ ./src/intel/tools/intel_error2hang /tmp/error

A resulting error.dmp file will be created

intel_hang_replay

This tool replays a binary file generated by intel_error2hangdump.

From the mesa build directory :

$ ./src/intel/tools/intel_hang_replay -d /tmp/error.dmp

intel_hang_viewer

This tool is a editor/visualizer for the file generated by intel_error2hangdump. When replaying on simulation a few tweaks might be needed in order for the simulator to accept the input commands (this is due to divergences between the simulation & HW implementations).

To visualize a file generated from a DG2 error state (from the mesa build directory) :

./src/intel/tools/intel_hang_viewer -p dg2 /tmp/error.dmp

To visualize and edit a file generated from a DG2 error state (from the mesa build directory) :

./src/intel/tools/intel_hang_viewer -e -p dg2 /tmp/error.dmp