Browse Source

[jit] Reduce initial code cache size to 32MiB across all platforms

Signed-off-by: lizzie <lizzie@eden-emu.dev>
pull/317/head
lizzie 7 months ago
committed by crueter
parent
commit
7de45aec5e
  1. 14
      src/core/arm/dynarmic/arm_dynarmic_32.cpp
  2. 14
      src/core/arm/dynarmic/arm_dynarmic_64.cpp

14
src/core/arm/dynarmic/arm_dynarmic_32.cpp

@ -210,24 +210,14 @@ std::shared_ptr<Dynarmic::A32::Jit> ArmDynarmic32::MakeJit(Common::PageTable* pa
config.wall_clock_cntpct = m_uses_wall_clock;
config.enable_cycle_counting = !m_uses_wall_clock;
// Code cache size
#ifdef ARCHITECTURE_arm64
config.code_cache_size = std::uint32_t(128_MiB);
#else
config.code_cache_size = std::uint32_t(512_MiB);
#endif
// Code cache size (16x2MiB pages)
config.code_cache_size = std::uint32_t(32_MiB);
// Allow memory fault handling to work
if (m_system.DebuggerEnabled()) {
config.check_halt_on_memory_access = true;
}
// null_jit
if (!page_table) {
// Don't waste too much memory on null_jit
config.code_cache_size = std::uint32_t(8_MiB);
}
// Safe optimizations
if (Settings::values.cpu_debug_mode) {
if (!Settings::values.cpuopt_page_tables) {

14
src/core/arm/dynarmic/arm_dynarmic_64.cpp

@ -269,24 +269,14 @@ std::shared_ptr<Dynarmic::A64::Jit> ArmDynarmic64::MakeJit(Common::PageTable* pa
config.wall_clock_cntpct = m_uses_wall_clock;
config.enable_cycle_counting = !m_uses_wall_clock;
// Code cache size
#ifdef ARCHITECTURE_arm64
config.code_cache_size = std::uint32_t(128_MiB);
#else
config.code_cache_size = std::uint32_t(512_MiB);
#endif
// Code cache size (16x2MiB pages)
config.code_cache_size = std::uint32_t(32_MiB);
// Allow memory fault handling to work
if (m_system.DebuggerEnabled()) {
config.check_halt_on_memory_access = true;
}
// null_jit
if (!page_table) {
// Don't waste too much memory on null_jit
config.code_cache_size = std::uint32_t(8_MiB);
}
// Safe optimizations
if (Settings::values.cpu_debug_mode) {
if (!Settings::values.cpuopt_page_tables) {

Loading…
Cancel
Save