mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-24 04:01: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) {
|
void Scheduler::SignalHandler(int signal, siginfo *info, ucontext *ctx, void **tls) {
|
||||||
if (*tls) {
|
if (*tls) {
|
||||||
TRACE_EVENT_END("guest");
|
TRACE_EVENT_END("guest");
|
||||||
|
{
|
||||||
|
TRACE_EVENT_FMT("scheduler", "{} Signal", signal == PreemptionSignal ? "Preemption" : "Yield");
|
||||||
const auto &state{*reinterpret_cast<nce::ThreadContext *>(*tls)->state};
|
const auto &state{*reinterpret_cast<nce::ThreadContext *>(*tls)->state};
|
||||||
if (signal == PreemptionSignal)
|
if (signal == PreemptionSignal)
|
||||||
state.thread->isPreempted = false;
|
state.thread->isPreempted = false;
|
||||||
state.scheduler->Rotate(false);
|
state.scheduler->Rotate(false);
|
||||||
YieldPending = false;
|
YieldPending = false;
|
||||||
state.scheduler->WaitSchedule();
|
state.scheduler->WaitSchedule();
|
||||||
|
}
|
||||||
TRACE_EVENT_BEGIN("guest", "Guest");
|
TRACE_EVENT_BEGIN("guest", "Guest");
|
||||||
} else {
|
} else {
|
||||||
YieldPending = true;
|
YieldPending = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user