mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
feature(debugger): online page fault event handling
Related-to: LOCI-2052 Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9db08001c4
commit
0c6444aab7
@@ -821,7 +821,12 @@ void DebugSessionImp::fillResumeAndStoppedThreadsFromNewlyStopped(std::vector<Eu
|
||||
memset(reg.get(), 0, regSize);
|
||||
readRegistersImp(newlyStopped, ZET_DEBUG_REGSET_TYPE_CR_INTEL_GPU, 0, 1, reg.get());
|
||||
|
||||
if (isForceExceptionOrForceExternalHaltOnlyExceptionReason(reg.get())) {
|
||||
if (allThreads[newlyStopped]->getPageFault()) {
|
||||
const uint32_t cr0PFBit16 = 0x10000;
|
||||
reg[1] = reg[1] | cr0PFBit16;
|
||||
writeRegistersImp(newlyStopped, ZET_DEBUG_REGSET_TYPE_CR_INTEL_GPU, 0, 1, reg.get());
|
||||
}
|
||||
if (isForceExceptionOrForceExternalHaltOnlyExceptionReason(reg.get()) && !allThreads[newlyStopped]->getPageFault()) {
|
||||
bool threadWasInterrupted = false;
|
||||
|
||||
for (auto &request : pendingInterrupts) {
|
||||
@@ -845,6 +850,7 @@ void DebugSessionImp::fillResumeAndStoppedThreadsFromNewlyStopped(std::vector<Eu
|
||||
}
|
||||
} else {
|
||||
PRINT_DEBUGGER_THREAD_LOG("Newly stopped thread = %s, exception bits = %#010" PRIx32 "\n", allThreads[newlyStopped]->toString().c_str(), reg[1]);
|
||||
allThreads[newlyStopped]->setPageFault(false);
|
||||
stoppedThreadsToReport.push_back(newlyStopped);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user