mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
204e5fd306
commit
9a53f20e6c
@@ -1325,8 +1325,14 @@ void DebugSessionLinux::handleAttentionEvent(prelim_drm_i915_debug_event_eu_atte
|
||||
}
|
||||
|
||||
if (gpuVa != 0 && stateSaveAreaSize != 0) {
|
||||
stateSaveArea = std::make_unique<char[]>(stateSaveAreaSize);
|
||||
stateSaveReadResult = readGpuMemory(vmHandle, stateSaveArea.get(), stateSaveAreaSize, gpuVa);
|
||||
|
||||
std::vector<EuThread::ThreadId> newThreads;
|
||||
getNotStoppedThreads(threadsWithAttention, newThreads);
|
||||
|
||||
if (newThreads.size() > 0) {
|
||||
stateSaveArea = std::make_unique<char[]>(stateSaveAreaSize);
|
||||
stateSaveReadResult = readGpuMemory(vmHandle, stateSaveArea.get(), stateSaveAreaSize, gpuVa);
|
||||
}
|
||||
} else {
|
||||
PRINT_DEBUGGER_ERROR_LOG("Context state save area bind info invalid\n", "");
|
||||
DEBUG_BREAK_IF(true);
|
||||
|
||||
Reference in New Issue
Block a user