Make memory breakpoint faster

Currently, slowmem is used at any time that memory breakpoints are in use.  This commit makes it so that whenever the DBAT gets updated, if the address is overllaping any memchecks, it forces the use of slowmem.  This allows to keep fastmem for any other cases and noticably increases performance when using memory breakpoints.
This commit is contained in:
aldelaro5
2017-02-24 21:10:22 -05:00
parent 0a8b5b79ef
commit 52fe05af6b
7 changed files with 39 additions and 25 deletions

View File

@ -46,7 +46,6 @@ bool JitBase::MergeAllowedNextInstructions(int count)
void JitBase::UpdateMemoryOptions()
{
bool any_watchpoints = PowerPC::memchecks.HasAny();
jo.fastmem = SConfig::GetInstance().bFastmem && !any_watchpoints;
jo.fastmem = SConfig::GetInstance().bFastmem;
jo.memcheck = SConfig::GetInstance().bMMU || any_watchpoints;
jo.alwaysUseMemFuncs = any_watchpoints;
}

View File

@ -52,7 +52,6 @@ protected:
bool accurateSinglePrecision;
bool fastmem;
bool memcheck;
bool alwaysUseMemFuncs;
};
struct JitState
{

View File

@ -29,13 +29,6 @@
using namespace Gen;
static CoreTiming::EventType* s_clear_jit_cache_thread_safe;
static void ClearCacheThreadSafe(u64 userdata, s64 cyclesdata)
{
JitInterface::ClearCache();
}
bool JitBlock::OverlapsPhysicalRange(u32 address, u32 length) const
{
return physical_addresses.lower_bound(address) !=
@ -50,7 +43,6 @@ JitBaseBlockCache::~JitBaseBlockCache() = default;
void JitBaseBlockCache::Init()
{
s_clear_jit_cache_thread_safe = CoreTiming::RegisterEvent("clearJitCache", ClearCacheThreadSafe);
JitRegister::Init(SConfig::GetInstance().m_perfDir);
Clear();
@ -89,11 +81,6 @@ void JitBaseBlockCache::Reset()
Init();
}
void JitBaseBlockCache::SchedulateClearCacheThreadSafe()
{
CoreTiming::ScheduleEvent(0, s_clear_jit_cache_thread_safe, 0, CoreTiming::FromThread::NON_CPU);
}
JitBlock** JitBaseBlockCache::GetFastBlockMap()
{
return fast_block_map.data();

View File

@ -125,7 +125,6 @@ public:
void Shutdown();
void Clear();
void Reset();
void SchedulateClearCacheThreadSafe();
// Code Cache
JitBlock** GetFastBlockMap();