[Beignet] [PATCH 0/5] Add support for kernel debugging
Mircea Gherzan
mircea.gherzan at intel.com
Fri Jul 8 12:39:34 UTC 2016
This patch series enables debugging OpenCL Beignet shaders with the GDB port
for Intel(R) GPUs.
Enabling debugging in the Beignet codebase involves:
* checking if the debugger is present
* setting a breakpoint on the first instruction of a kernel,
* getting the "debug system routine" that dumps the content of the EU registers
to a "debug surface" once a breakpoint is encountered in the shader,
* setting up the BOs for the system routine and for the debug surface,
* writing the right MMIO registers (via batch buffer commands) in order
to enable the shader debug in the hardware.
* notifying the debugger infrastructure that a certain kernel is under debug,
in order to prevent the "Debug Companion Driver" from auto-resuming
the kernel.
The interaction with the debugger is done via the debugger interchange library.
This library as well as other debugger open-source components (the kernel driver,
libraries, GDB) are delivered in the Intel(R) Parallel Studio XE.
Tested on HSW, BDW and SKL.
Mircea Gherzan (5):
backend: add support for kernel debugging
runtime: add support for the interchange library of the debugger
runtime: use the "-debug" build option if the debugger is active
runtime: set the kernel name in the cl_gpgpu_kernel structure
runtime: support for the debug system routine, surface and MMIO
registers
backend/src/backend/context.cpp | 4 +-
backend/src/backend/context.hpp | 4 +-
backend/src/backend/gen_context.cpp | 12 ++-
backend/src/backend/gen_context.hpp | 2 +-
backend/src/backend/gen_program.cpp | 7 +-
backend/src/backend/gen_program.hpp | 8 +-
backend/src/backend/program.cpp | 5 +-
src/CMakeLists.txt | 1 +
src/cl_command_queue_gen7.c | 6 +-
src/cl_context.c | 4 +
src/cl_context.h | 2 +
src/cl_driver.h | 4 +
src/cl_driver_defs.c | 2 +-
src/cl_program.c | 40 ++++++++
src/intel/intel_debugger.c | 158 +++++++++++++++++++++++++++++
src/intel/intel_debugger.h | 70 +++++++++++++
src/intel/intel_defines.h | 11 +++
src/intel/intel_gpgpu.c | 192 ++++++++++++++++++++++++++++++++++--
src/intel/intel_gpgpu.h | 7 ++
19 files changed, 516 insertions(+), 23 deletions(-)
create mode 100644 src/intel/intel_debugger.c
create mode 100644 src/intel/intel_debugger.h
--
1.8.3.1
More information about the Beignet
mailing list