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>
This commit is contained in:
Yates, Brandon
2022-12-12 22:18:52 +00:00
committed by Compute-Runtime-Automation
parent cc61e2d997
commit 66581a0a1d
2 changed files with 20 additions and 0 deletions

View File

@@ -745,6 +745,9 @@ bool DebugSessionImp::isForceExceptionOrForceExternalHaltOnlyExceptionReason(uin
void DebugSessionImp::fillResumeAndStoppedThreadsFromNewlyStopped(std::vector<EuThread::ThreadId> &resumeThreads, std::vector<EuThread::ThreadId> &stoppedThreadsToReport) {
if (newlyStoppedThreads.empty()) {
return;
}
const auto regSize = std::max(getRegisterSize(ZET_DEBUG_REGSET_TYPE_CR_INTEL_GPU), 64u);
auto reg = std::make_unique<uint32_t[]>(regSize / sizeof(uint32_t));