Commit Graph

88 Commits

Author SHA1 Message Date
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
Brandon Yates 9c56a11c2e refactor(debugger): Move PF exception check into bitmask
Related-to: NEO-8617
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-09-28 08:28:00 +02:00
Brandon Yates b3464a2621 feature(debugger): Expose DBG regset
Related-To: NEO-8383

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-09-26 11:50:29 +02:00
Jitendra Sharma 8f7b3e6699 feature: Report 128 GRF count with zetDebugGetRegisterSetProperties
Related-to: NEO-6788

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2023-09-18 11:03:59 +02:00
Brandon Yates 7c1f5585d7 feature(debugger): online page fault event handling
Sync to
https://github.com/intel-gpu/drm-uapi-helper/releases/tag/v2.0-rc20

Related-to: LOCI-2052

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-09-18 00:15:45 +02:00
Compute-Runtime-Validation e489c16529 Revert "feature: Report 128 GRF count with zetDebugGetRegisterSetProperties"
This reverts commit 6596ce5097.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-09-14 14:34:55 +02:00
Jitendra Sharma 6596ce5097 feature: Report 128 GRF count with zetDebugGetRegisterSetProperties
Related-to: NEO-6788

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2023-09-13 14:12:38 +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
Compute-Runtime-Validation e61c5af7ec Revert "feature(debugger): online page fault event handling"
This reverts commit 0c6444aab7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-08-24 08:16:45 +02:00
Brandon Yates 0c6444aab7 feature(debugger): online page fault event handling
Related-to: LOCI-2052

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-08-23 18:29:58 +02:00
Brandon Yates 9db08001c4 fix(debugger): Set flags for MME regset
Related-to: NEO-8286

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-08-23 16:38:35 +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
Brandon Yates bef89a3a7c feature(debugger): Force GRF count to 128
System Routine changes for implementing large-grf debugging
will result in GRF count of 256 being reported for kernels
in all GRF modes. Applications using L0 Debug API do not
yet have a way to determine actual GRF count for kernel.

This commit is a temporary adjustment to avoid breaking debug
API users after new system routine is enabled.

This problem will be fully solved in follow up patch with switch to
zetDebugGetThreadRegisterSetProperties

Related-to: NEO-7370

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-06-27 14:24:52 +02:00
Brandon Yates 713f166d17 feature(debugger): Implement zetDebugGetThreadRegisterSetProperties (1/n)
Current SIP implementation has constant reg descs for all threads.
Initial implementation of this API always returns same reg descs as the
non-thread version of API. When SIP exposes per-thread reg descs,
this API will be updated to expose them.

Related-to: NEO-7370
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2023-05-08 14:46:48 +02:00
Fabian Zwolinski e351a90f81 refactor: Rename member variables to camelCase 2/n
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-27 20:39:22 +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 bfb59cc573 fix: do not resume threads that have pending THREAD_STOPPED events
- threads with pending events cannot be resumed by resume(all) as they
they were not yet discovered by debugger as stopped.
- set reportAsStopped when THREAD_STOPPED event is read
- when resuming, only resume a thread when it was reported

Related-To: NEO-7817

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-03-31 12:42:25 +02:00
Mateusz Jablonski fbe01e534b fix l0 debug: correct UNRECOVERABLE_IF condition
correct debug API tests to respect more than 8 threads per eu

Related-To: NEO-7442

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-10 12:54:31 +01:00
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