2
rem A batch program to build PGO (Profile guided optimization) by first
3
rem building instrumented binaries, then running the testsuite, and
4
rem finally building the optimized code.
5
rem Note, after the first instrumented run, one can just keep on
6
rem building the PGUpdate configuration while developing.
11
rem use the performance testsuite. This is quick and simple
12
set job1=..\..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
13
set path1=..\..\tools\pybench
15
rem or the whole testsuite for more thorough testing
16
set job2=..\..\lib\test\regrtest.py
23
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
24
if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
30
rem build the instrumented version
31
call build -p %platf% -c PGInstrument
33
rem remove .pyc files, .pgc files and execute the job
34
%PGI%\python.exe rmpyc.py %clrpath%
36
%PGI%\python.exe %job%
38
rem finally build the optimized version
39
if exist %PGO% del /s /q %PGO%
40
call build -p %platf% -c PGUpdate