Added last task ticks counter

This commit is contained in:
Alex
2023-02-27 17:44:10 +02:00
parent c4a2f645de
commit df24131e48
4 changed files with 16 additions and 1 deletions

View File

@ -458,6 +458,7 @@ namespace Tasking
}
CPU::x64::writecr3({.raw = (uint64_t)KernelPageTable}); /* Restore kernel page table for safety reasons. */
uint64_t SchedTmpTicks = CPU::Counter();
this->LastTaskTicks = SchedTmpTicks - this->LastTaskTicks;
CPUData *CurrentCPU = GetCurrentCPU();
schedbg("Scheduler called on CPU %d.", CurrentCPU->ID);
schedbg("%d: %ld%%", CurrentCPU->ID, GetUsage(CurrentCPU->ID));