pcsx2: add a --profiling cli option

Disable Framelimiter and Vsync

So you can profile real data instead of the idle time between vsync ;)
This commit is contained in:
Gregory Hainaut 2016-12-04 19:59:24 +01:00
parent 0453e5cad8
commit 903d3595e5
5 changed files with 20 additions and 1 deletions

View File

@ -33,6 +33,9 @@ Specifies the config folder. It applies to pcsx2 + plugins.
forces running of the First-time Wizard.
.TP
.B --profiling
eases running from profiler tool such as Vtune
.TP
.SH AUTO-RUN OPTIONS
.TP
@ -76,7 +79,7 @@ Disables the quick boot feature, forcing you to sit through the PS2 startup spla
Override for the CDVD plugin.
.TP
.B --gs=[libpath]
.B --gs=[libpath]
Override for the GS plugin.
.TP

View File

@ -324,6 +324,7 @@ public:
wxFileName VmSettingsFile;
bool DisableSpeedhacks;
bool ProfilingMode;
// Note that gamefixes in this array should only be honored if the
// "HasCustomGamefixes" boolean is also enabled.
@ -338,6 +339,7 @@ public:
DisableSpeedhacks = false;
ApplyCustomGamefixes = false;
GsWindowMode = GsWinMode_Unspecified;
ProfilingMode = false;
}
// Returns TRUE if either speedhacks or gamefixes are being overridden.

View File

@ -353,6 +353,12 @@ static void _ApplySettings( const Pcsx2Config& src, Pcsx2Config& fixup )
else if( !g_Conf->EnableGameFixes )
fixup.Gamefixes.DisableAll();
if( overrides.ProfilingMode )
{
fixup.GS.FrameLimitEnable = false;
fixup.GS.VsyncEnable = false;
}
wxString gameCRC;
wxString gameSerial;
wxString gamePatch;

View File

@ -249,6 +249,8 @@ void Pcsx2App::OnInitCmdLine( wxCmdLineParser& parser )
parser.AddSwitch( wxEmptyString,L"forcewiz", AddAppName(_("forces %s to start the First-time Wizard")) );
parser.AddSwitch( wxEmptyString,L"portable", _("enables portable mode operation (requires admin/root access)") );
parser.AddSwitch( wxEmptyString,L"profiling", _("update options to ease profiling (debug)") );
const PluginInfo* pi = tbl_PluginInfo; do {
parser.AddOption( wxEmptyString, pi->GetShortname().Lower(),
pxsFmt( _("specify the file to use as the %s plugin"), WX_STR(pi->GetShortname()) )
@ -282,6 +284,8 @@ bool Pcsx2App::ParseOverrides( wxCmdLineParser& parser )
Overrides.DisableSpeedhacks = parser.Found(L"nohacks");
Overrides.ProfilingMode = parser.Found(L"profiling");
if (parser.Found(L"gamefixes", &dest))
{
Overrides.ApplyCustomGamefixes = true;

View File

@ -157,6 +157,10 @@ void Panels::FramelimiterPanel::Apply()
}
appfps.SanityCheck();
// If the user has a command line override specified, we need to disable it
// so that their changes take effect
wxGetApp().Overrides.ProfilingMode = false;
}
// --------------------------------------------------------------------------------------