Fix two profiling bugs

This commit is contained in:
Ryan Dwyer 2023-05-03 22:29:18 +10:00
parent 880db15689
commit f54c812fdf
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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