mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Enhance logs in EuThread
- do not overwrite memoryHandle in resumeThread() when thread is not stopped - add SIP Commands Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d9f47d6d7d
commit
4d6a2d0a57
@@ -71,12 +71,13 @@ class EuThread {
|
||||
return false;
|
||||
}
|
||||
state = State::Stopped;
|
||||
PRINT_DEBUGGER_THREAD_LOG("Stopped thread: %s", toString().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool verifyStopped(uint8_t newCounter) {
|
||||
|
||||
PRINT_DEBUGGER_INFO_LOG("EuThread::verifyStopped() Thread: %s newCounter == %d oldCounter == %d", toString().c_str(), (int32_t)newCounter, (int32_t)systemRoutineCounter);
|
||||
PRINT_DEBUGGER_THREAD_LOG("EuThread::verifyStopped() Thread: %s newCounter == %d oldCounter == %d", toString().c_str(), (int32_t)newCounter, (int32_t)systemRoutineCounter);
|
||||
|
||||
if (newCounter == systemRoutineCounter) {
|
||||
if (newCounter % 2 != 0) {
|
||||
@@ -115,11 +116,13 @@ class EuThread {
|
||||
}
|
||||
|
||||
bool resumeThread() {
|
||||
memoryHandle = invalidHandle;
|
||||
if (state != State::Stopped) {
|
||||
PRINT_DEBUGGER_THREAD_LOG("Resuming already RUNNING thread: %s", toString().c_str());
|
||||
return false;
|
||||
}
|
||||
PRINT_DEBUGGER_THREAD_LOG("Resumed thread: %s", toString().c_str());
|
||||
state = State::Running;
|
||||
memoryHandle = invalidHandle;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -153,7 +156,7 @@ class EuThread {
|
||||
|
||||
protected:
|
||||
ThreadId threadId;
|
||||
State state = State::Unavailable;
|
||||
std::atomic<State> state = State::Unavailable;
|
||||
uint8_t systemRoutineCounter = 0;
|
||||
std::atomic<uint64_t> memoryHandle = invalidHandle;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user