Fix perf_meter<> after adding thread pool.

Print and reset sorted information after emulation stop/pause.
Print useless average value.
This commit is contained in:
Nekotekina 2020-11-19 11:12:59 +03:00
parent 3e1344e4e4
commit d4d5dc99f3
3 changed files with 85 additions and 17 deletions

View file

@ -3,6 +3,7 @@
#include "Utilities/bin_patch.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
#include "Emu/perf_meter.hpp"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/PPUCallback.h"
@ -1797,6 +1798,8 @@ void Emulator::Resume()
ppu_log.notice("[RESUME] Dumping instruction stats:%s", dump);
}
perf_stat_base::report();
// Try to resume
if (!m_state.compare_and_swap_test(system_state::paused, system_state::running))
{
@ -1880,6 +1883,8 @@ void Emulator::Stop(bool restart)
jit_runtime::finalize();
perf_stat_base::report();
static u64 aw_refs = 0;
static u64 aw_colm = 0;
static u64 aw_colc = 0;