From 41a553e33ea7e83e44a1c4633d9a5aec0c65e115 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 5 May 2018 14:21:57 +0100 Subject: [PATCH] Jit64: warn about code cache flushing The game Go Vacation (SGVEAF) currently stutters a lot because it keeps overflowing the far code cache and all code needs to be re-jitted. Logging this warning gives a useful hint as to what is causing the stuttering. --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 4c4ae55c42..06a8a5a735 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -584,6 +584,12 @@ void Jit64::Jit(u32 em_address) if (IsAlmostFull() || m_far_code.IsAlmostFull() || trampolines.IsAlmostFull() || SConfig::GetInstance().bJITNoBlockCache) { + if (!SConfig::GetInstance().bJITNoBlockCache) + { + const auto reason = + IsAlmostFull() ? "main" : m_far_code.IsAlmostFull() ? "far" : "trampoline"; + WARN_LOG(POWERPC, "flushing %s code cache, please report if this happens a lot", reason); + } ClearCache(); }