mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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:
@ -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;
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ protected:
|
||||
bool accurateSinglePrecision;
|
||||
bool fastmem;
|
||||
bool memcheck;
|
||||
bool alwaysUseMemFuncs;
|
||||
};
|
||||
struct JitState
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -125,7 +125,6 @@ public:
|
||||
void Shutdown();
|
||||
void Clear();
|
||||
void Reset();
|
||||
void SchedulateClearCacheThreadSafe();
|
||||
|
||||
// Code Cache
|
||||
JitBlock** GetFastBlockMap();
|
||||
|
Reference in New Issue
Block a user