mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +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
@@ -1393,4 +1393,21 @@ ze_result_t DebugSessionImp::waitForCmdReady(EuThread::ThreadId threadId, uint16
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
void DebugSessionImp::getNotStoppedThreads(const std::vector<EuThread::ThreadId> &threadsWithAtt, std::vector<EuThread::ThreadId> ¬StoppedThreads) {
|
||||
for (const auto &threadId : threadsWithAtt) {
|
||||
|
||||
bool wasStopped = false;
|
||||
|
||||
if (tileSessionsEnabled) {
|
||||
wasStopped = tileSessions[threadId.tileIndex].first->allThreads[threadId]->isStopped();
|
||||
} else {
|
||||
wasStopped = allThreads[threadId]->isStopped();
|
||||
}
|
||||
|
||||
if (!wasStopped) {
|
||||
notStoppedThreads.push_back(threadId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user