intel/tools: new intel_sanitize_gpu tool
authorKevin Rogovin <kevin.rogovin@intel.com>
Fri, 9 Feb 2018 01:11:25 +0000 (17:11 -0800)
committerScott D Phillips <scott.d.phillips@intel.com>
Thu, 5 Apr 2018 20:52:49 +0000 (13:52 -0700)
commitcc41603d6da4552f0aaf32325a8f019c44c3d9c8
tree1fa68288a418b69a1f299752d307d897135691a0
parente85b95269e49036402c3a8204450707eb6111d15
intel/tools: new intel_sanitize_gpu tool

Adds a new debug tool to pad each GEM BO allocated with (weak)
pseudo-random noise values which are then checked after each
batchbuffer dispatch to the kernel. This can be quite valuable to
find diffucult to track down heisenberg style bugs.

[scott.d.phillips@intel.com: split to separate tool]

v2: (by Scott D Phillips)
    - track gem handles per fd (Kevin)
    - remove handles on GEM_CLOSE (Kevin)
    - ignore prime handles
    - meson & shell script

v3: (by Scott D Phillips)
    - don't track prime bos at all (Kevin)
    - protect the hash table with a mutex (Kevin)
    - hook fds by drm_version.name, not path (Chris Wilson)

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/intel/tools/intel_sanitize_gpu.c [new file with mode: 0644]
src/intel/tools/intel_sanitize_gpu.in [new file with mode: 0755]
src/intel/tools/meson.build