diff --git a/src/lib/profile.c b/src/lib/profile.c index 2d40ae70a..6740ec264 100644 --- a/src/lib/profile.c +++ b/src/lib/profile.c @@ -165,6 +165,7 @@ void profileGetCounters(u32 counters[5]) // Main thread counters[3] = g_MainThread.cycles_saved + (osGetCount() - g_MainThread.cycles_at_dispatch); g_MainThread.cycles_saved = 0; + g_MainThread.cycles_at_dispatch = osGetCount(); // Scheduler thread counters[4] = g_SchedThread.cycles_saved; diff --git a/src/lib/ultra/os/exceptasm.s b/src/lib/ultra/os/exceptasm.s index 2e9450fc3..d33ab911d 100644 --- a/src/lib/ultra/os/exceptasm.s +++ b/src/lib/ultra/os/exceptasm.s @@ -661,7 +661,7 @@ glabel __osDispatchThread subu $t0, $t0, $t1 # t0 = COUNT - cycles_at_dispatch lw $t1, 0x230($v1) # t1 = cycles_saved addu $t1, $t1, $t0 # cycles_saved += COUNT - cycles_at_dispatch - sw $t0, 0x230($v1) + sw $t1, 0x230($v1) .Ldispatch: addiu $t0, $zero, 0x4