/PC/VS8.0/build_pgo.bat

http://unladen-swallow.googlecode.com/ · Batch · 41 lines · 31 code · 10 blank · 0 comment · 5 complexity · 08b362c0e99937565992c4c5b67cf3a9 MD5 · raw file

  1. @echo off
  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.
  7. setlocal
  8. set platf=Win32
  9. rem use the performance testsuite. This is quick and simple
  10. set job1=..\..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
  11. set path1=..\..\tools\pybench
  12. rem or the whole testsuite for more thorough testing
  13. set job2=..\..\lib\test\regrtest.py
  14. set path2=..\..\lib
  15. set job=%job1%
  16. set clrpath=%path1%
  17. :CheckOpts
  18. if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
  19. if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
  20. set PGI=%platf%-pgi
  21. set PGO=%platf%-pgo
  22. @echo on
  23. rem build the instrumented version
  24. call build -p %platf% -c PGInstrument
  25. rem remove .pyc files, .pgc files and execute the job
  26. %PGI%\python.exe rmpyc.py %clrpath%
  27. del %PGI%\*.pgc
  28. %PGI%\python.exe %job%
  29. rem finally build the optimized version
  30. if exist %PGO% del /s /q %PGO%
  31. call build -p %platf% -c PGUpdate