CPU: print and reset suspend_all statistics

This commit is contained in:
Nekotekina 2020-10-13 00:27:27 +03:00
parent dc39a9b84f
commit 1606f97177
1 changed files with 7 additions and 1 deletions

View File

@ -889,7 +889,13 @@ void cpu_thread::stop_all() noexcept
std::this_thread::sleep_for(10ms);
}
sys_log.notice("All CPU threads have been stopped.");
sys_log.notice("All CPU threads have been stopped. [+: %u; suspends: %u]", +g_threads_created, +g_suspend_counter);
std::lock_guard lock(g_fxo->get<cpu_counter>()->cpu_suspend_lock);
g_threads_deleted -= g_threads_created.load();
g_threads_created = 0;
g_suspend_counter = 0;
}
void cpu_thread::flush_profilers() noexcept