summaryrefslogtreecommitdiff
path: root/debugger
AgeCommit message (Collapse)Author
2016-06-30intel_chipset: Replace lookup of GT size with computationChris Wilson
Instead of a large if-chain for matching devid to GT, we can just compute it directly from the encoded devid. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-24lib: Add a GPU error detectorChris Wilson
If we listen to the uevents from the kernel, we can detect when the GPU hangs. This requires us to fork a helper process to do so and send a signal back to the parent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19lib/igt_aux: Divert ioctls for signal injectionChris Wilson
To simplify and speed up running interruptible tests, use a custom ioctl() function that control the signaling and detect when we need no more iterations to trigger an interruption. We use a realtime timer to inject the signal after a certain delay, increasing the delay on every loop to try and exercise different code paths within the function. The first delay is very short such that we hopefully enter the kernel with a pending signal. Clients should use struct igt_sigiter iter = {}; while (igt_sigiter_repeat(&iter, enable_interrupts=true)) do_test() to automatically repeat the test until we can inject no more signals into the ioctls. This is condensed into a macro igt_interruptible(enable_interrupts=true) do_test(); for convenience. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-11Add missing noreturn attribute to various functionsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08build: fix unused-result warningsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-05-27debugger: remove unnecessary struct per_thread_dataYunlian Jiang
This removes unnecessary 'struct per_thread_data' and avoids the compilation error 'variable length array in structure extension will never be supported' by clang. The bug entry is https://code.google.com/p/chromium/issues/detail?id=476001 Cc: Benjamin Widawsky <benjamin.widawsky@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Yunlian Jiang <yunlian@google.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26lib: print a stack trace when a test assertion failsThomas Wood
Add an optional dependency on libunwind to print stack traces when a test assertion fails. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-27shader-debugger: Force file/stdout IO as UTF-8Rémi Cardona
Not all locales on linux are UTF-8, the most notable being the C locale. Python will use the ASCII codec for stream IO in this case and will barf on the Copyright sign at the top of .g4a files. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=519434 Signed-off-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter
With the header cleanup we can now give this header a suitable name, since it now really only contains register access and other I/O functions and assorted definitions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: remove uncessary #includes from headersDaniel Vetter
Only include what the header itself needs. The big fish here is intel-gpu-tools.h. More will follow. One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one of which was broken. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11debugger: fix the -p optionThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19debugger: avoid global variable shadowingDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-20shader-debugger: Use in tree gen4asmBen Widawsky
Reported-by: Patrick McMunn <doctorwhoguy@gmail.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-07-19build: Fix automake 1.13 warningsDamien Lespiau
warning: deprecated feature: target 'sr' overrides 'sr$(EXEEXT)' Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04build: Add CAIRO_FLAGS to the debugger compilationDamien Lespiau
The library in lib/ exposes <cairo.h> in its main header and thus users must be able to include it.
2012-05-22lib: extract kmstest_create_fbDaniel Vetter
We should get more kms tests soon, and not needing to copy-paste a nice test pattern should be useful. That establishes a firm depency of i-g-t on cairo over everything, but I don't care so much about that. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-12Debugger: convert existing makefiles to Automake.Gaetan Nadon
A common xorg idiom is used. The dependencies are auto-detected. If they are present, the debugger is build. If any are missing, the debugger is silently skipped. If --enable-shader-debugger is specified, the configuration will abort if any of the dependencies is missing. No user actions is needed, no env variable to set (as it should be) This will fix a number of problems: build cannot start due Makefile missing in tarball. build fails as GEN4ASM variable not available in Makefile. distcheck is also disturbed. In the process other minor problems were fixed: helper target is missing dependencies on evict.h. too may arguments given to pre_cpp.py but they were ignored. fills /tmp with temporary files. Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-01-04config: use project wide xorg warnings variableGaetan Nadon
Use CWARNFLAGS as in all of xorg. There seems to be no reason why this module should be different. The warnings were updated recently for those who install the latest util-macros. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04Use standard .gitignore file and layoutGaetan Nadon
Reusing xorg code saves maintenance in the long term. Now that m4/.gitignore is removed, the -I m4 ${ACLOCAL_FLAGS} must be removed to avoid build breakage as m4 is generated and not part of the git source. Acked-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-31i-g-t/debugger - make the debugger work with distcheckBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2011-10-31i-g-t/debugger: Only allow the shader debugger if the user has specified a ↵Ben Widawsky
gen4asm Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2011-09-13intel: we don't do distcheck for the debuggerBen Widawsky
2011-07-28intel-gpu-tools/debugging: shader debuggerBen Widawsky
high level summary of the files: * debug_rdata - get current state from debug registers. Helpful when developing the debugger, and could serve some purpose in the future. * eudb - the debugger itself * eviction_macro - generate the proper macro to flush the EU render cache until I get control flow working * pre_cpp - an evaluating c preprocesser like thing, to be used before cpp * sr - the system routine, exception handler which runs on the EU * test - a very basic test system routine * debug.h