diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index b05a1142cf..dc59bd450b 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -107,6 +107,11 @@ void spu_cache::initialize() if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit) { + if (g_cfg.core.spu_debug) + { + fs::file(Emu.GetCachePath() + "SPUJIT.log", fs::rewrite); + } + compiler = spu_recompiler_base::make_asmjit_recompiler(); } @@ -916,6 +921,11 @@ public: fs::create_dir(m_cache_path); fs::remove_all(m_cache_path, false); + if (g_cfg.core.spu_debug) + { + fs::file(m_cache_path + "../spu.log", fs::rewrite); + } + LOG_SUCCESS(SPU, "SPU Recompiler Runtime (LLVM) initialized..."); } }; @@ -1571,7 +1581,7 @@ public: if (g_cfg.core.spu_debug) { out.flush(); - fs::file(Emu.GetCachePath() + "SPU.log", fs::write + fs::append).write(log); + fs::file(m_spurt->m_cache_path + "../spu.log", fs::write + fs::append).write(log); } if (m_cache) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 1e3d26b5d5..c7f5505583 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -919,23 +919,6 @@ void Emulator::Load(bool add_only) LOG_NOTICE(LOADER, "Elf path: %s", argv[0]); } - if (g_cfg.core.spu_debug) - { - fs::file log; - - if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit) - { - log.open(Emu.GetCachePath() + "SPUJIT.log", fs::rewrite); - } - - if (g_cfg.core.spu_decoder == spu_decoder_type::llvm) - { - log.open(Emu.GetCachePath() + "SPU.log", fs::rewrite); - } - - log.write(fmt::format("SPU JIT Log\n\nTitle: %s\nTitle ID: %s\n\n", Emu.GetTitle(), Emu.GetTitleID())); - } - ppu_load_exec(ppu_exec); fxm::import(Emu.GetCallbacks().get_gs_render); // TODO: must be created in appropriate sys_rsx syscall