summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/profile_run.cmd11
-rw-r--r--MCServer/profile_run_debug.cmd2
-rw-r--r--MCServer/profile_run_x64.cmd5
3 files changed, 12 insertions, 6 deletions
diff --git a/MCServer/profile_run.cmd b/MCServer/profile_run.cmd
index 1ed47ac11..6137e9d4d 100644
--- a/MCServer/profile_run.cmd
+++ b/MCServer/profile_run.cmd
@@ -12,7 +12,8 @@
:: It expects the MS Performance tools installed in C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools
:: You can override this path by setting the pt environment variable prior to launching this script
::
-:: By default it will launch the release version of MCServer; set the app environment variable to another executable to run that instead.
+:: By default it will launch the 32-bit release version of MCServer; set the app environment variable to another executable to run that instead.
+:: Set the IsExecutablex64 env variable to \x64 to profile a 64-bit executable instead (available as the profile_run_x64.cmd script)
:: Note that the app needs to be compiled with the "/PROFILE" flag in order for the profiling to work
@@ -55,15 +56,15 @@ mkdir %outputdir%
:: Start the profiler
set outputname=profile.vsp
set output=%outputdir%\%outputname%
-%pt%\vsperfcmd /start:sample /output:%output%
+%pt%%IsExecutablex64%\vsperfcmd /start:sample /output:%output%
if errorlevel 1 goto haderror
:: Launch the application via the profiler
-%pt%\vsperfcmd /launch:%app%
+%pt%%IsExecutablex64%\vsperfcmd /launch:%app%
if errorlevel 1 goto haderrorshutdown
:: Shut down the profiler (this command waits, until the application is terminated)
-%pt%\vsperfcmd /shutdown
+%pt%%IsExecutablex64%\vsperfcmd /shutdown
if errorlevel 1 goto haderror
@@ -88,7 +89,7 @@ goto finished
:haderrorshutdown
echo An error was encountered, shutting down the profiler
-%pt%\vsperfcmd /shutdown
+%pt%%IsExecutablex64%\vsperfcmd /shutdown
:haderror
echo An error was encountered
diff --git a/MCServer/profile_run_debug.cmd b/MCServer/profile_run_debug.cmd
index 8bf85f049..a9792541a 100644
--- a/MCServer/profile_run_debug.cmd
+++ b/MCServer/profile_run_debug.cmd
@@ -2,4 +2,4 @@
:: This script uses the profile_run.cmd script to run profiling on the DebugProfile executable
set app=MCServer_debug_profile.exe
-call profile_run.cmd \ No newline at end of file
+call profile_run.cmd
diff --git a/MCServer/profile_run_x64.cmd b/MCServer/profile_run_x64.cmd
new file mode 100644
index 000000000..242136f4b
--- /dev/null
+++ b/MCServer/profile_run_x64.cmd
@@ -0,0 +1,5 @@
+@echo off
+:: This script uses the profile_run.cmd script to run profiling on a x64 release executable
+
+set IsExecutablex64=\x64
+call profile_run.cmd