Remove PROFILE_MEMORY_SAVE_STATES
This commit is contained in:
parent
8c87884dd9
commit
933beb6bb1
1 changed files with 0 additions and 40 deletions
|
|
@ -45,8 +45,6 @@
|
|||
#include <thread>
|
||||
Log_SetChannel(System);
|
||||
|
||||
// #define PROFILE_MEMORY_SAVE_STATES 1
|
||||
|
||||
SystemBootParameters::SystemBootParameters() = default;
|
||||
|
||||
SystemBootParameters::SystemBootParameters(SystemBootParameters&& other) = default;
|
||||
|
|
@ -2360,10 +2358,6 @@ bool SaveMemoryState(MemorySaveState* mss)
|
|||
|
||||
bool SaveRewindState()
|
||||
{
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Common::Timer save_timer;
|
||||
#endif
|
||||
|
||||
// try to reuse the frontmost slot
|
||||
const u32 save_slots = g_settings.rewind_save_slots;
|
||||
MemorySaveState mss;
|
||||
|
|
@ -2378,11 +2372,6 @@ bool SaveRewindState()
|
|||
|
||||
s_rewind_states.push_back(std::move(mss));
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Log_DevPrintf("Saved rewind state (%" PRIu64 " bytes, took %.4f ms)", s_rewind_states.back().state_stream->GetSize(),
|
||||
save_timer.GetTimeMilliseconds());
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -2397,20 +2386,12 @@ bool LoadRewindState(u32 skip_saves /*= 0*/, bool consume_state /*=true */)
|
|||
if (s_rewind_states.empty())
|
||||
return false;
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Common::Timer load_timer;
|
||||
#endif
|
||||
|
||||
if (!LoadMemoryState(s_rewind_states.back()))
|
||||
return false;
|
||||
|
||||
if (consume_state)
|
||||
s_rewind_states.pop_back();
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Log_DevPrintf("Rewind load took %.4f ms", load_timer.GetTimeMilliseconds());
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -2478,11 +2459,6 @@ void SaveRunaheadState()
|
|||
|
||||
void DoRunahead()
|
||||
{
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Common::Timer timer;
|
||||
Log_DevPrintf("runahead starting at frame %u", s_frame_number);
|
||||
#endif
|
||||
|
||||
if (s_runahead_replay_pending)
|
||||
{
|
||||
// we need to replay and catch up - load the state,
|
||||
|
|
@ -2497,9 +2473,6 @@ void DoRunahead()
|
|||
// TODO: can we leave one frame here and run, avoiding the extra save?
|
||||
s_runahead_states.clear();
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Log_VerbosePrintf("Rewound to frame %u, took %.2f ms", s_frame_number, timer.GetTimeMilliseconds());
|
||||
#endif
|
||||
}
|
||||
|
||||
// run the frames with no audio
|
||||
|
|
@ -2507,9 +2480,6 @@ void DoRunahead()
|
|||
if (frames_to_run > 0)
|
||||
{
|
||||
Common::Timer timer2;
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
const s32 temp = frames_to_run;
|
||||
#endif
|
||||
|
||||
g_spu.SetAudioStream(s_runahead_audio_stream.get());
|
||||
|
||||
|
|
@ -2522,9 +2492,6 @@ void DoRunahead()
|
|||
|
||||
g_spu.SetAudioStream(g_host_interface->GetAudioStream());
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Log_VerbosePrintf("Running %d frames to catch up took %.2f ms", temp, timer2.GetTimeMilliseconds());
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2532,9 +2499,6 @@ void DoRunahead()
|
|||
SaveRunaheadState();
|
||||
}
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Log_DevPrintf("runahead ending at frame %u, took %.2f ms", s_frame_number, timer.GetTimeMilliseconds());
|
||||
#endif
|
||||
}
|
||||
|
||||
void DoMemorySaveStates()
|
||||
|
|
@ -2561,10 +2525,6 @@ void SetRunaheadReplayFlag()
|
|||
if (s_runahead_frames == 0 || s_runahead_states.empty())
|
||||
return;
|
||||
|
||||
#ifdef PROFILE_MEMORY_SAVE_STATES
|
||||
Log_DevPrintf("Runahead rewind pending...");
|
||||
#endif
|
||||
|
||||
s_runahead_replay_pending = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue