On 13-Jul-16 10:47 AM, He Junyan wrote:
Hi Mircea,
Thanks a lot for you contribution.
I have several questions here.
According to my understanding, your debug feature strongly depends on
the libigfxdbgxchg64.so lib, which I think is a binary and I can not
find it in your patchset. I notice you get a SIP of some system routine
and allocate a buffer object to copy that system routine. How can user
control the execution of GPU program is unknown in this patchset. So
is it possible to open the source code of libigfxdbgxchg64.so.  Or at
least can you provide that lib and give a document about how to use it?

Indeed, these patches partially depend on the libigfxdbgxchg64.so ("interchange library"). This library is an open-source one and its sources are distributed with the Intel(R) Parallel Studio XE 2017 Beta [1] installation.

The user can control the execution of the GPU program using standard GDB commands. The re-targeted GDB and the infrastructure required by it (library + kernel driver) are also distributed with the Intel(R) Parallel Studio XE 2017 Beta.

- Mircea

[1] https://software.intel.com/en-us/articles/intel-parallel-studio-xe-2017-beta

On Fri, Jul 08, 2016 at 02:39:34PM +0200, Mircea Gherzan wrote:
Date: Fri,  8 Jul 2016 14:39:34 +0200
From: Mircea Gherzan <[email protected]>
To: [email protected]
Cc: Mircea Gherzan <[email protected]>, [email protected]
Subject: [Beignet] [PATCH 0/5] Add support for kernel debugging
X-Mailer: git-send-email 1.7.0.7

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

_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to