mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 20:41:50 +01:00
Trace Scheduler Preemption/Yield in Perfetto
This commit is contained in:
parent
c874907eb5
commit
a0539a3edb
@ -15,12 +15,15 @@ namespace skyline::kernel {
|
||||
void Scheduler::SignalHandler(int signal, siginfo *info, ucontext *ctx, void **tls) {
|
||||
if (*tls) {
|
||||
TRACE_EVENT_END("guest");
|
||||
{
|
||||
TRACE_EVENT_FMT("scheduler", "{} Signal", signal == PreemptionSignal ? "Preemption" : "Yield");
|
||||
const auto &state{*reinterpret_cast<nce::ThreadContext *>(*tls)->state};
|
||||
if (signal == PreemptionSignal)
|
||||
state.thread->isPreempted = false;
|
||||
state.scheduler->Rotate(false);
|
||||
YieldPending = false;
|
||||
state.scheduler->WaitSchedule();
|
||||
}
|
||||
TRACE_EVENT_BEGIN("guest", "Guest");
|
||||
} else {
|
||||
YieldPending = true;
|
||||
|
Loading…
Reference in New Issue
Block a user