mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 14:31:17 +12:00
Debugging: Add minimalist PPC profiler
This commit is contained in:
parent
45072fccb2
commit
9499870cc9
7 changed files with 281 additions and 43 deletions
|
@ -812,17 +812,21 @@ namespace coreinit
|
|||
return suspendCounter > 0;
|
||||
}
|
||||
|
||||
bool OSIsThreadRunningNoLock(OSThread_t* thread)
|
||||
{
|
||||
cemu_assert_debug(__OSHasSchedulerLock());
|
||||
return thread->state == OSThread_t::THREAD_STATE::STATE_RUNNING;
|
||||
}
|
||||
|
||||
bool OSIsThreadRunning(OSThread_t* thread)
|
||||
{
|
||||
bool isRunning = false;
|
||||
__OSLockScheduler();
|
||||
if (thread->state == OSThread_t::THREAD_STATE::STATE_RUNNING)
|
||||
isRunning = true;
|
||||
isRunning = OSIsThreadRunningNoLock(thread);
|
||||
__OSUnlockScheduler();
|
||||
return isRunning;
|
||||
}
|
||||
|
||||
|
||||
void OSCancelThread(OSThread_t* thread)
|
||||
{
|
||||
__OSLockScheduler();
|
||||
|
|
|
@ -538,6 +538,7 @@ namespace coreinit
|
|||
|
||||
bool OSIsThreadTerminated(OSThread_t* thread);
|
||||
bool OSIsThreadSuspended(OSThread_t* thread);
|
||||
bool OSIsThreadRunningNoLock(OSThread_t* thread);
|
||||
bool OSIsThreadRunning(OSThread_t* thread);
|
||||
|
||||
// OSThreadQueue
|
||||
|
@ -603,6 +604,8 @@ namespace coreinit
|
|||
void __OSAddReadyThreadToRunQueue(OSThread_t* thread);
|
||||
bool __OSCoreShouldSwitchToThread(OSThread_t* currentThread, OSThread_t* newThread);
|
||||
void __OSQueueThreadDeallocation(OSThread_t* thread);
|
||||
|
||||
bool __OSIsThreadActive(OSThread_t* thread);
|
||||
}
|
||||
|
||||
#pragma pack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue