Commit Graph

35 Commits

Author SHA1 Message Date
Jitendra Sharma f56babb2a9 refactor: Move common attention handling EuDebug code out of prelim
Move common attention handling code from prelim in common linux
debug_session(.h/.cpp) files.
This common code could be shared to handle attention events for
prelim and xe driver based Eu Debug

Related-To: NEO-9673
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2024-02-19 14:49:30 +01:00
Mateusz Jablonski bf60d77e10 refactor: correct naming of enum class constants n/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-20 10:56:37 +01:00
Mateusz Jablonski 8c90350f3c refactor: correct naming of enum class constants 5/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 10:06:02 +01:00
Mateusz Jablonski b92b5892b8 refactor: correct variable naming
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-01 08:34:19 +01:00
Mateusz Jablonski c9664e6bad refactor: rename global debug manager to debugManager
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-30 13:00:59 +01:00
Brandon Yates 253e1df43b feature(debugger): Filter page fault threads by start IP
When a thread is stopped due to potential page fault
we must check AIP against start IP to ensure it is not
a newly started thread accidentally caught by PF algorithm

Related-to: NEO-8617

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-09-29 12:45:32 +02:00
Jitendra Sharma 9818ef61a5 feature: Report correct GRF register count
Based on Large GRF enabled or not, report correct GRF
register.

Related-To: NEO-6788
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2023-09-04 11:42:48 +02:00
Compute-Runtime-Validation 154530ad23 Revert "feature: Report correct GRF register count"
This reverts commit 8eb3fe222e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-09-01 15:12:57 +02:00
Jitendra Sharma 8eb3fe222e feature: Report correct GRF register count
Based on Large GRF enabled or not, report correct GRF
register.

Related-To: NEO-6788
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2023-08-31 18:48:29 +02:00
Mateusz Hoppe 8e07dd30cb performance(debugger): optimize ATT handling - minimize mem allocs
- do not allocate state save area every time attention event
is handled
- keep allocated memory for subsequent events
- remove not needed DBEUG_BREAK

Related-To: NEO-8183

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-07-18 08:37:04 +02:00
Mateusz Hoppe 9a53f20e6c performance(debugger): optimize ATT event handling
- check threads with attention state before reading SR_IDENT
- memory read is costly, for threads already in stopped state
there is no need to read sr_ident and check thread state again
- single stepping one thread performance is substantially improved,
by the factor of 6x

Related-To: NEO-8183

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-07-17 10:42:34 +02:00
Mateusz Hoppe bfd32d6284 fix: read state save area once for all threads for resume(ALL)
- when resume(all) is called - all threads' sr counter needs to be
verified. Reading state save area separately for all threads takes
longer than reading whole state save area once. State save area is
only read again if sr counter wasn't updated
- fail while reading state save area means threads might have completed
execution
- this fix optimizes time spent in resume(all), that may be called before
debugger detaches

Related-To: NEO-7897

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-04-17 15:41:13 +02:00
Mateusz Hoppe 079105a5c2 fix: optimize ATT handling - read state save area once for all threads
- reading state save area for every threads takes too long when all
application threads have completed and there are stale ATT events to
process
- on detach gdb seemed to be frozen waiting for ATT event to be handled
- fix is to read state save area once - and check SIP counter for every
thread in ATT bitmask

Related-To: NEO-7897

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-04-14 10:57:18 +02:00
Mateusz Hoppe e26ebfc51b fix: check exception reason for stopped threads
- before marking interrupt request check exception reason. If there is
exception other than forced exception or forced external halt treat
thread as stopped and generate distinct event for it.

Related-To: NEO-7869

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-04-05 12:01:20 +02: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
Matias Cabral 2f09a07445 Increase min version of SIP with SLM support
Resolves: NEO-7506

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2023-01-27 19:06:58 +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
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
Matias Cabral 8d8f821b6c Optimize SLM ULTs execution time
Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2022-11-03 11:12:13 +01: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
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
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 61242205e0 L0Debug - tile attach implementation
- PROCESS ENTRY/EXIT events
- MODULE events
- DETACH event
- memory access

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-08-18 13:38:51 +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
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 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
Yates, Brandon 7ccde3fb20 L0 Win Debug - read StateSave and moduleDebug header
Related-to: NEO-7162
Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2022-07-13 14:33:47 +02:00
Mateusz Hoppe 31ebf37091 Fix potential stack corruption in DebugSessionImp
- allocate 64 bytes on stack when accessing registers

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-06-15 16:18:24 +02:00
Igor Venevtsev f4182e37ee Add debugger support - debug session implementation
Resolves: NEO-6813

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-04-27 17:53:48 +02:00