Commit Graph

66 Commits

Author SHA1 Message Date
Yates, Brandon
11bec57d10 fix(L0 debug): Fix singleThread conversion for some hw configs
Configs with low slices disabled produced wrong EuThread vector

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2023-03-10 10:30:49 +01:00
Mateusz Hoppe
802848a43f fix: L0Debug - allow access only for reported stopped threads
- read/write registers/memory only allowed for threads reported as
stopped by events
- threads newly stopped, accidentally, that are resumed immediately
are not allowed register/memory access

Related-To: NEO-7776

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-03-03 13:34:57 +01:00
Mateusz Hoppe
6947220298 perf(debugger): Optimize registers access during debugging
Register read/write implementation was unnecessarily checking magic values
which were taking significant time. By removing those checks, register
access is speed-up by a factor of 3.

Resolves: NEO-7754

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-02-23 12:14:03 +01:00
Mateusz Hoppe
e8b4841577 perf(debugger): Optimize single-stepping of eu threads
Single-stepping threads is based on resume() and THREAD_STOPPED events
To speed up single-stepping, stopped threads must be discovered
immediately after resume() is called.
This change is adding ATT scan and event generation in resume()

Related-To: NEO-7750

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-02-23 11:06:13 +01:00
Warchulski, Jaroslaw
b224ec947e Cleanup includes 50
Cleaned up files:
shared/source/helpers/hw_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-10 20:26:13 +01:00
Kamil Kopryk
524d945e8c refactor: rename l0 hw_helpers dir to gfx_core_helpers
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-02 11:15:56 +01:00
Kamil Kopryk
2484c7ceb2 refactor: rename hw_helper files to gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-01 19:37:51 +01:00
Yates, Brandon
f53d9103ad Fix(L0Debug): Fix thread creation on dg2 128EU
Not enough EUThread objects were being created
resulting in a crash during breeakpoint
processing

Related-to: LOCI-3937

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2023-01-31 19:48:50 +01:00
Kamil Kopryk
eb002acaa1 refactor: rename l0_gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-24 12:59:26 +01:00
Warchulski, Jaroslaw
0eac749fcc Cleanup includes 19
Cleaned up files:
opencl/source/api/cl_types.h
shared/source/compiler_interface/external_functions.h
shared/source/compiler_interface/linker.h
shared/source/device_binary_format/elf/elf.h
shared/source/helpers/preamble.h
shared/source/memory_manager/definitions/storage_info.h
shared/source/memory_manager/memory_manager.h
shared/source/memory_manager/os_agnostic_memory_manager.h
shared/source/program/program_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 11:02:05 +01:00
Kamil Kopryk
98e0557a4c Don't use global getter for L0GfxCoreHelper and GfxCoreHelper in L0 2/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-02 11:55:14 +01:00
Kamil Kopryk
08e9fce536 fix(zebin): fix deadlock in detach tile debug session
With Zebin enabled lock was called
by a thread that already owns the mutex.
This lock is not needed as it's already locked
under another mutex in debuchDetach

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-30 13:13:44 +01:00
Kamil Kopryk
93deff0698 Refactor: don't use global ProductHelper getter in L0 3/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-23 12:19:03 +01:00
Warchulski, Jaroslaw
f275eea6ec Cleanup includes 14
Cleaned up files:
shared/source/device/device.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-23 10:46:34 +01:00
Kamil Kopryk
232b886056 Rename HwInfoConfig to ProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-14 14:39:52 +01:00
Yates, Brandon
66581a0a1d L0 Debug - Avoid SSAH lookup when no threads are stopped
During async thread event processing, it was possible to
read SSAH before any threads stopped and before it was
resident resulting in an assert. This is both a fix for
assertion and minor optimization.

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2022-12-13 03:07:22 +01:00
Kamil Kopryk
03b687881f Rename HwHelper -> GfxCoreHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-09 10:29:06 +01:00
Warchulski, Jaroslaw
be647d42d9 Cleanup includes 12
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-07 13:14:15 +01:00
Kamil Kopryk
73b2104183 Rename L0HwHelper -> L0GfxCoreHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-05 11:26:05 +01:00
Matias Cabral
467119931c Add SIP version check
Make SLM access a single template function

Resolves: NEO-7335

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2022-12-01 00:55:04 +01:00
Mateusz Hoppe
e0370d25b9 L0Debug - Fix scratch offset calculation
- euRatio should only affect EUs offsets - not thread offsets

Resolves: NEO-7520

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-18 09:52:07 +01:00
Kamil Kopryk
aaa4e90ad4 Move L0HwHelper ownership to RootDeviceEnvironment 1/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Use RootDeviceEnvironment getHelper<L0CoreHelper> for
- setAdditionalGroupProperty
- createEvent
- isResumeWARequired
2022-11-15 08:24:23 +01:00
Mateusz Hoppe
5206fd1b9a L0Debug - interrupt stopped events for newly stopped threads
- do not mark interrupt as complete when thread was stopped
before handling ATT event
- if no newly stopped threads reported in ATT event, interrupt
trigger thread unavailable event

Related-To: NEO-7501

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-10 15:25:24 +01:00
Yates, Brandon
99ef6c499b L0 debug - fix windows bitmask decode
Keep threads created in EU range (0,7)

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2022-11-07 14:41:29 +01:00
Mateusz Hoppe
6f710bfad7 L0Debug - disallow attaching to multiple pids
Resolves: NEO-7476

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-03 19:21:53 +01:00
Compute-Runtime-Validation
d653779098 Revert "L0 debug - Fix thread creation for windows DSS"
This reverts commit 3724807eed.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-10-22 14:38:24 +02:00
Artur Harasimiuk
9ad3f6190f do not sleep in ULTs
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-10-21 19:37:52 +02:00
Yates, Brandon
3724807eed L0 debug - Fix thread creation for windows DSS
Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2022-10-21 18:47:49 +02:00
Matias Cabral
b103b0c43f Reduce the SLM time waiting on ready CMD to 100 uSec
Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2022-10-21 12:50:58 +02:00
Matias Cabral
4affe9907c Update SLM access offset behavior
Related-To: NEO-5998

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2022-10-17 18:07:27 +02:00
Mateusz Hoppe
95505d87a5 L0Debug - fix interrupt
- pass deviceIndex based on deviceBitfield
- do not call ioctl again on EBUSY error

Resolves: NEO-7414

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-10-14 13:56:57 +02:00
Yates, Brandon
44894c1fdf L0 Debug- Create generic topologyMap interface
Move Linux DebugSession thread conversion functions up to
DebugSessionImp to allow reuse in windows implementation

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2022-10-13 15:12:05 +02:00
Matias Cabral
56109b882f Support debugger SLM write
Resolves: NEO-5998

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2022-10-11 16:37:14 +02:00
Igor Venevtsev
66f5af0fec L0Debug: simple code cleanup
Use dedicated readSystemRoutineIdent() instead of raw readGpuMemory()

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-10-04 13:45:18 +02:00
Mateusz Hoppe
fddd1976c1 L0Debug - close connection when releasing Device resources
- when debugDetach() is not called properly, close connection
in debug session before Device is destroyed

Related-To: NEO-7366

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-10-04 13:10:12 +02:00
Matias Cabral
c012034c19 Debugger access to SLM
Resolves: NEO-5998

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2022-09-30 11:31:19 +02:00
Mateusz Hoppe
7ff258fc92 L0Debug - Enable attaching to Root or Subdevices
- enable tile attach mode by default
- both root device and subdevice may be attached to

Related-To: NEO-7347

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-09-26 16:03:54 +02:00
Mateusz Hoppe
dd7967a05d L0Debug - account for device bitfield
- converting physical/api thread ids should account for
devicebitfield
- debug events for ISA filtered - skip events for not
relevant tiles

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-09-09 13:03:06 +02:00
Yates, Brandon
12c7f32679 L0 Win Debugger - implement thread control
Resolves: NEO-6722

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-09-05 19:26:14 +02:00
Jitendra Sharma
3212a71760 Debugger L0 Win: Attention event handling from UMD
Related-To: NEO-7261

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2022-09-02 18:22:41 +02:00
Mateusz Hoppe
e6c0d2d1e8 L0Debug - store and restore events for tile session
- keep track of all loaded modules
- keep track of process entry/exit state
- restore valid events on attach
- acknowledge/clean events on detach

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-08-29 15:35:38 +02:00
Mateusz Hoppe
4bd53be195 L0Debug - tile attach - add missing implementation
- interrupt / resume
- read/write registers

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-08-24 07:32:29 +02:00
Mateusz Hoppe
2a5bca380d L0Debug - tile debug session - initial changes
Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-08-16 10:44:12 +02:00
Kamil Kopryk
d4d54f5093 Cleanup includes
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-25 09:58:38 +02:00
Mateusz Hoppe
023f9df999 L0Debug - move apiEvents queue to DebugSessionImp
- the logic of reading api events is OS agnostic

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-07-15 16:19:38 +02:00
Mateusz Hoppe
bd07b3ec97 L0Debug refactor: Replace ze_device_thread_t with EuThread::ThreadId
- ThreadId is preferred beacuse it uniquely identifies thread and is
not related to device topology

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-07-14 20:01:56 +02:00
Mateusz Hoppe
b89ebb3dd2 L0Debug: Fix for possible crash while passing set of threads
- zetDebugRead/WriteRegisters() only accept single thread

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-07-14 18:35:40 +02:00
Mateusz Hoppe
ae0e701f6f L0Debug refactor - check single thread is stopped accessing regs
- enhance register access tests
- remove not used param from resume wa function

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-07-14 16:02:25 +02:00
Mateusz Hoppe
e8a9099bf2 Refactor register access functions
- use ThreadId instead of api ze_dvice_thread_t

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-07-13 18:55:27 +02:00
Mateusz Hoppe
d139d307f0 L0Debug - extract memory access params validation
- remove duplication of code by moving common code
to DebugSessionImp

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-07-13 16:45:37 +02:00