SHARE
TWEET

SteamVR gpuview log.cmd

a guest Aug 19th, 2015 477 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2.  
  3. REM In order to capture etl traces, this script relies on Xperf.exe. It is assumed
  4. REM that Xperf.exe will be installed in GPUView's parent directory.
  5.  
  6. REM
  7. REM Logic:
  8. REM
  9. REM  If the command line is blank, we'll try to start logging using normal settings.
  10. REM  If the command line is blank and we're already logging, we'll turn off logging.
  11. REM  If the command line reads light, we'll turn on the minimum.
  12. REM  If the command line reads verbose, we'll turn everything on.
  13. REM
  14.  
  15. REM
  16. REM Different tracing options that can be enabled
  17. REM
  18. REM SET XXX=(GUID|KnownProviderName)[:(Flags|Groups)[:Level[:'stack']]]
  19. set TRACE_DXVA2=a0386e75-f70c-464c-a9ce-33c44e091623:0xffff:5
  20. set TRACE_MMCSS=f8f10121-b617-4a56-868b-9df1b27fe32c:0xffff:5
  21. set TRACE_WMDRM=6e03dd26-581b-4ec5-8f22-601a4de5f022:0xffff:5
  22. set TRACE_WME=8f2048e0-f260-4f57-a8d1-932376291682
  23. set TRACE_WMP=681069c4-b785-466a-bc63-4aa616644b68:0xffff:5
  24. set TRACE_DVD=75d4a1bb-7cc6-44b1-906d-d5e05be6d060:0xffff:5
  25. set TRACE_DSHOW=28cf047a-2437-4b24-b653-b9446a419a69
  26. set TRACE_VR=8c8f13b1-60eb-4b6a-a433-de86104115ac
  27. set TRACE_DROP=16dfcd28-769d-4459-8262-56dae9706a3d
  28. set TRACE_MF=f404b94e-27e0-4384-bfe8-1d8d390b0aa3+362007f7-6e50-4044-9082-dfa078c63a73:0x000000000000ffff:0x5
  29. set TRACE_AE=a6a00efd-21f2-4a99-807e-9b3bf1d90285:0x000000000000ffff:0x3
  30. set TRACE_HME=63770680-05F1-47E0-928A-9ACFDCF52147:0xffff:5
  31. set TRACE_HDDVD=779d8cdc-666b-4bf4-a367-9df89d6901e8:0xffff:5
  32. set TRACE_DWMAPIGUID=71dd85bc-d474-4974-b0f6-93ffc5bfbd04::6
  33. set TRACE_SCHEDULEGUID=8cc44e31-7f28-4f45-9938-4810ff517464:0xffff:6
  34. set TRACE_DX=DX
  35. set TRACE_DXGI=CA11C036-0102-4A2D-A6AD-F03CFED5D3C9:0xf:6:'stack'
  36. set TRACE_D3D11=db6f6ddb-ac77-4e88-8253-819df9bbf140:0xffffffffffffffff:6:'stack'
  37. set TRACE_D3D10LEVEL9=7E7D3382-023C-43cb-95D2-6F0CA6D70381:0x1
  38. set TRACE_DXC=802ec45a-1e99-4b83-9920-87c98277ba9d
  39. set TRACE_DXC_ALL=%TRACE_DXC%:0xFFFF:5:'stack'
  40. set TRACE_DXC_LONGHAUL=%TRACE_DXC%:0x800:5
  41. set TRACE_DXC_MIN=%TRACE_DXC%:0x800:5
  42. set TRACE_DXC_LIGHT=%TRACE_DXC%:0x826:5
  43. set TRACE_DXC_NORMAL=%TRACE_DXC%:0xA36:5
  44. set TRACE_DXC_STACKS=%TRACE_DXC%:0x8041:5:'stack'
  45. set TRACE_UMD=a688ee40-d8d9-4736-b6f9-6b74935ba3b1:0xffff:5
  46. set TRACE_DWM=a42c77db-874f-422e-9b44-6d89fe2bd3e5:0x000000007fffffff:0x5
  47. set TRACE_DWM2=8c9dd1ad-e6e5-4b07-b455-684a9d879900:0xFFFF:6
  48. set TRACE_DWM3=9e9bba3c-2e38-40cb-99f4-9e8281425164:0xFFFF:6
  49. set TRACE_CODEC=ea6d6e3b-7014-4ab1-85db-4a50cda32a82:0xffff:5
  50. set TRACE_KMFD=E7C7EDF9-D0E4-4338-8AE3-BCA3C5B4B4A3
  51. set TRACE_UMFD=a70bc228-e778-4061-86fa-debb03fda64a
  52. REM set TRACE_AVALON=AvalonALL
  53. set TRACE_TESTFRAMEWORK=31293f4f-f7bb-487d-8b3b-f537b827352f
  54. set TRACE_TEST=42C4E0C1-0D92-46f0-842C-1E791FA78D52
  55. set TRACE_SC=30336ed4-e327-447c-9de0-51b652c86108
  56. set TRACE_XAML=531A35AB-63CE-4BCF-AA98-F88C7A89E455:0xffff
  57. set TRACE_WIN32K=8c416c79-d49b-4f01-a467-e56d3aa8234c:0xffff
  58. set TRACE_D2D=dcb453db-c652-48be-a0f8-a64459d5162e:0:5
  59. set TRACE_D2DSCENARIOS=712909c0-6e57-4121-b639-87c8bf9004e0
  60.  
  61. REM
  62. REM To Add another provider, create an environment varaible here
  63. REM set TRACE_PRIVATE=X
  64. REM
  65.  
  66. if not "%TLOG%"=="" goto Done_With_It
  67. REM
  68. REM To determine physical memory
  69. REM
  70. if not "%TRACE_LOGGING_MEMORY%" == "" goto Do_Not_Process_File
  71. systeminfo > me.txt
  72. findstr /sipn /C:"Total Physical Memory" me.txt > me2.txt
  73. REM TRACE_LOGGING_MEMORY will hold the amount of physical memory on this machine.
  74. for /f "tokens=6 delims=: " %%a in (me2.txt) do set TRACE_LOGGING_MEMORY=%%a
  75. del me.txt
  76. del me2.txt
  77. set TRACE_LOGGING_MEMORY=%TRACE_LOGGING_MEMORY:,=%
  78. :Do_Not_Process_File
  79.  
  80. REM
  81. REM For buffers sizes
  82. REM
  83. REM The cutoff for large bufers 5G, Medium buffers 2G physical memory
  84. if %TRACE_LOGGING_MEMORY% Gtr 4000 goto Set_Large_Buffers
  85. if %TRACE_LOGGING_MEMORY% Gtr 2000 goto Set_Medium_Buffers
  86. REM echo !Using Small Buffers Memory Footprint here!
  87. set TRACE_LARGE_BUFFERS=-BufferSize 1024 -MinBuffers 30 -MaxBuffers 120
  88. set TRACE_STAND_BUFFERS=-BufferSize 1024 -MinBuffers 25 -MaxBuffers 25
  89. goto Done_With_It
  90. :Set_Medium_Buffers
  91. REM echo !Using Meidum Buffers Memory Footprint here!
  92. set TRACE_LARGE_BUFFERS=-BufferSize 1024 -MinBuffers 60 -MaxBuffers 240
  93. set TRACE_STAND_BUFFERS=-BufferSize 1024 -MinBuffers 50 -MaxBuffers 50
  94. goto Done_With_It
  95. :Set_Large_Buffers
  96. REM echo !Using Large Buffers Memory Footprint here!
  97. set TRACE_LARGE_BUFFERS=-BufferSize 1024 -MinBuffers 120 -MaxBuffers 480
  98. set TRACE_STAND_BUFFERS=-BufferSize 1024 -MinBuffers 100 -MaxBuffers 100
  99. :Done_With_It
  100.  
  101. REM
  102. REM NT logging groupings
  103. REM
  104. set TRACE_NT_MIN=LOADER+PROC_THREAD+CSWITCH+DISPATCHER+POWER
  105. set TRACE_NT_LONGHAUL=LOADER+PROC_THREAD+POWER
  106. set TRACE_NT_LIGHT=%TRACE_NT_MIN%+DISK_IO+HARD_FAULTS
  107. REM
  108. REM Note in order to get callstacks on amd64 bit builds, you need to enable the following
  109. REM registry key:
  110. REM
  111. REM HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management\DisablePagingExecutive
  112. REM
  113. REM by setting it to 1. Lookup DisablePagingExecutive via your favorite search engine for details.
  114. REM
  115. set TRACE_NT_NORMAL=%TRACE_NT_LIGHT%+PROFILE+MEMINFO+DPC+INTERRUPT -stackwalk @"%~dp0\EventsForStackTrace.txt"
  116. set TRACE_NT_VERBOSE=%TRACE_NT_LIGHT%+PROFILE+MEMINFO+SYSCALL+DPC+INTERRUPT+ALL_FAULTS -stackwalk @"%~dp0\EventsForStackTrace.txt"
  117.  
  118. REM
  119. REM From 'xperf -help providers' we get the following table. GPUView, at a minimum
  120. REM really needs LOADER, PROC_THREAD and CSWITCH.
  121. REM
  122. REM Kernel Flags:
  123. REM        PROC_THREAD    : Process and Thread create/delete
  124. REM        LOADER         : Kernel and user mode Image Load/Unload events
  125. REM        PROFILE        : CPU Sample profile
  126. REM        CSWITCH        : Context Switch
  127. REM        COMPACT_CSWITCH: Compact Context Switch
  128. REM        DISPATCHER     : CPU Scheduler
  129. REM        DPC            : DPC Events
  130. REM        INTERRUPT      : Interrupt events
  131. REM        SYSCALL        : System calls
  132. REM        PRIORITY       : Priority change events
  133. REM        ALPC           : Advanced Local Procedure Call
  134. REM        PERF_COUNTER   : Process Perf Counters
  135. REM        DISK_IO        : Disk I/O
  136. REM        DISK_IO_INIT   : Disk I/O Initiation
  137. REM        FILE_IO        : File system operation end times and results
  138. REM        FILE_IO_INIT   : File system operation (create/open/close/read/write)
  139. REM        HARD_FAULTS    : Hard Page Faults
  140. REM        FILENAME       : FileName (e.g., FileName create/delete/rundown)
  141. REM        SPLIT_IO       : Split I/O
  142. REM        REGISTRY       : Registry tracing
  143. REM        DRIVERS        : Driver events
  144. REM        POWER          : Power management events
  145. REM        NETWORKTRACE   : Network events (e.g., tcp/udp send/receive)
  146. REM        VIRT_ALLOC     : Virtual allocation reserve and release
  147. REM        MEMINFO        : Memory List Info
  148. REM        ALL_FAULTS     : All page faults including hard, Copy on write, demand zero faults, etc.
  149.  
  150.  
  151. REM
  152. REM The Environment variable TLOG (trace logging) will be used to indicate that
  153. REM logging is active or not. if TLOG is set to ON, we're currently logging.
  154. REM
  155.  
  156. if "%TLOG%"=="" goto StartSection
  157. if "%TLOG%"=="MIN" goto StopSection
  158. if "%TLOG%"=="NORMAL" goto StopSection
  159. if "%TLOG%"=="LIGHT" goto StopSection
  160. if "%TLOG%"=="LONGHAUL" goto StopSection
  161. if "%TLOG%"=="VERBOSE" goto StopSection
  162.  
  163. REM Start Logging section
  164. :StartSection
  165.  
  166. REM
  167. REM If we're already logging, stop logging.
  168. REM
  169. if "%TLOG%"=="MIN" goto StopSection
  170. if "%TLOG%"=="NORMAL" goto StopSection
  171. if "%TLOG%"=="LIGHT" goto StopSection
  172. if "%TLOG%"=="LONGHAUL" goto StopSection
  173. if "%TLOG%"=="VERBOSE" goto StopSection
  174.  
  175. REM
  176. REM Check to see if they used a command line option
  177. REM
  178.  
  179. if "%1%" == "" goto StartNormal
  180. if "%1%" == "normal" goto StartNormal
  181. if "%1%" == "n" goto StartNormal
  182. if "%1%" == "light" goto StartLight
  183. if "%1%" == "longhaul" goto StartLonghaul
  184. if "%1%" == "l" goto StartLight
  185. if "%1%" == "min" goto StartMin
  186. if "%1%" == "m" goto StartMin
  187. if "%1%" == "verbose" goto StartVerbose
  188. if "%1%" == "v" goto StartVerbose
  189. goto CLUsage
  190.  
  191. :StartMin
  192. REM
  193. REM Start Min
  194. REM
  195. if %errorlevel% GTR 0 goto OSUsage
  196. "%~dp0"..\Xperf -on %TRACE_NT_MIN% %TRACE_LARGE_BUFFERS% -f Kernel.etl
  197. "%~dp0"..\Xperf -start DxLogger -on %TRACE_DX%:0x9 %TRACE_LARGE_BUFFERS% -f DX.etl
  198.  
  199. "%~dp0"..\Xperf -start DxcState -on %TRACE_DXC_ALL% %TRACE_LARGE_BUFFERS% -f DXCState.etl
  200. "%~dp0"..\Xperf -capturestate DxcState %TRACE_DXC_ALL%
  201. "%~dp0"..\Xperf -stop DxcState
  202. "%~dp0"..\Xperf -start DxcStackLogger -on %TRACE_DXC_STACKS% %TRACE_LARGE_BUFFERS% -f DXCStacks.etl
  203.  
  204. "%~dp0"..\Xperf -start DxcLogger -on %TRACE_DXC_MIN% %TRACE_LARGE_BUFFERS% -f DXC.etl
  205. "%~dp0"..\Xperf -start UMDLogger -on %TRACE_UMD% %TRACE_STAND_BUFFERS% -f UMD.etl
  206. "%~dp0"..\Xperf -capturestate UMDLogger 0xffff:5
  207. "%~dp0"..\Xperf -start DXGILogger -on %TRACE_DXGI% %TRACE_STAND_BUFFERS% -f DXGI.etl
  208. "%~dp0"..\Xperf -capturestate DXGILogger %TRACE_DXGI%
  209. "%~dp0"..\Xperf -start Dx11Logger -on %TRACE_D3D11% %TRACE_STAND_BUFFERS% -f DX11.etl
  210. "%~dp0"..\Xperf -capturestate Dx11Logger %TRACE_D3D11%
  211. "%~dp0"..\Xperf -start D3D10Level9Logger -on %TRACE_D3D10LEVEL9% %TRACE_STAND_BUFFERS% -f D3D10Level9.etl
  212. "%~dp0"..\Xperf -capturestate D3D10Level9Logger %TRACE_D3D10LEVEL9%
  213. "%~dp0"..\Xperf -start XAMLLogger -on %TRACE_XAML%:4 %TRACE_STAND_BUFFERS% -f XAML.etl
  214. set TLOG=MIN
  215. goto EndIt
  216.  
  217. :StartLight
  218. REM
  219. REM Start Light
  220. REM
  221. if %errorlevel% GTR 0 goto OSUsage
  222. "%~dp0"..\Xperf -on %TRACE_NT_LIGHT% %TRACE_LARGE_BUFFERS% -f Kernel.etl
  223. "%~dp0"..\Xperf -start DxLogger -on %TRACE_DX%:0x2F %TRACE_LARGE_BUFFERS% -f DX.etl
  224.  
  225. "%~dp0"..\Xperf -start DxcState -on %TRACE_DXC_ALL% %TRACE_LARGE_BUFFERS% -f DXCState.etl
  226. "%~dp0"..\Xperf -capturestate DxcState %TRACE_DXC_ALL%
  227. "%~dp0"..\Xperf -stop DxcState
  228. "%~dp0"..\Xperf -start DxcStackLogger -on %TRACE_DXC_STACKS% %TRACE_LARGE_BUFFERS% -f DXCStacks.etl
  229.  
  230. "%~dp0"..\Xperf -start DxcLogger -on %TRACE_DXC_LIGHT% %TRACE_LARGE_BUFFERS% -f DXC.etl
  231. "%~dp0"..\Xperf -start UMDLogger -on %TRACE_UMD% %TRACE_STAND_BUFFERS% -f UMD.etl
  232. "%~dp0"..\Xperf -capturestate UMDLogger %TRACE_UMD%
  233. "%~dp0"..\Xperf -start DXGILogger -on %TRACE_DXGI% %TRACE_STAND_BUFFERS% -f DXGI.etl
  234. "%~dp0"..\Xperf -capturestate DXGILogger %TRACE_DXGI%
  235. "%~dp0"..\Xperf -start Dx11Logger -on %TRACE_D3D11% %TRACE_STAND_BUFFERS% -f DX11.etl
  236. "%~dp0"..\Xperf -capturestate Dx11Logger %TRACE_D3D11%
  237. "%~dp0"..\Xperf -start D3D10Level9Logger -on %TRACE_D3D10LEVEL9% %TRACE_STAND_BUFFERS% -f D3D10Level9.etl
  238. "%~dp0"..\Xperf -capturestate D3D10Level9Logger %TRACE_D3D10LEVEL9%
  239. "%~dp0"..\Xperf -start MfLogger -on %TRACE_MF%+%TRACE_WME% %TRACE_STAND_BUFFERS% -f mf.etl
  240. "%~dp0"..\Xperf -start XAMLLogger -on %TRACE_XAML%:4 %TRACE_STAND_BUFFERS% -f XAML.etl
  241. set TLOG=LIGHT
  242. goto EndIt
  243.  
  244. :StartLonghaul
  245. REM
  246. REM Start Longhaul
  247. REM
  248. if %errorlevel% GTR 0 goto OSUsage
  249. "%~dp0"..\Xperf -on %TRACE_NT_LONGHAUL% %TRACE_LARGE_BUFFERS% -f Kernel.etl
  250. "%~dp0"..\Xperf -start DxcLogger -on %TRACE_DXC_LONGHAUL% %TRACE_LARGE_BUFFERS% -f DXC.etl
  251. "%~dp0"..\Xperf -capturestate DxcLogger %TRACE_DXC_LONGHAUL%
  252. set TLOG=LONGHAUL
  253. goto EndIt
  254.  
  255. :StartNormal
  256. REM
  257. REM Start Normal
  258. REM
  259. REM To enable private provider
  260. REM Xperf -start PriLogger -on %TRACE_PRIVATE% %TRACE_LARGE_BUFFERS% -f Private.etl
  261. REM
  262. if %errorlevel% GTR 0 goto OSUsage
  263. "%~dp0"..\Xperf -on %TRACE_NT_NORMAL% %TRACE_LARGE_BUFFERS% -f Kernel.etl
  264. "%~dp0"..\Xperf -start DxTest -on %TRACE_TESTFRAMEWORK%+%TRACE_TEST% %TRACE_STAND_BUFFERS% -f DxTest.etl
  265. "%~dp0"..\Xperf -start DxLogger -on %TRACE_DX%:0x2F %TRACE_LARGE_BUFFERS% -f DX.etl
  266.  
  267. "%~dp0"..\Xperf -start DxcState -on %TRACE_DXC_ALL% %TRACE_LARGE_BUFFERS% -f DXCState.etl
  268. "%~dp0"..\Xperf -capturestate DxcState %TRACE_DXC_ALL%
  269. "%~dp0"..\Xperf -stop DxcState
  270. "%~dp0"..\Xperf -start DxcStackLogger -on %TRACE_DXC_STACKS% %TRACE_LARGE_BUFFERS% -f DXCStacks.etl
  271.  
  272. "%~dp0"..\Xperf -start DxcLogger -on %TRACE_DXC_NORMAL% %TRACE_LARGE_BUFFERS% -f DXC.etl
  273. "%~dp0"..\Xperf -start UMDLogger -on %TRACE_UMD% %TRACE_STAND_BUFFERS% -f UMD.etl
  274. "%~dp0"..\Xperf -capturestate UMDLogger %TRACE_UMD%
  275. "%~dp0"..\Xperf -start DXGILogger -on %TRACE_DXGI% %TRACE_STAND_BUFFERS% -f DXGI.etl
  276. "%~dp0"..\Xperf -capturestate DXGILogger %TRACE_DXGI%
  277. "%~dp0"..\Xperf -start Dx11Logger -on %TRACE_D3D11% %TRACE_STAND_BUFFERS% -f DX11.etl
  278. "%~dp0"..\Xperf -capturestate Dx11Logger %TRACE_D3D11%
  279. "%~dp0"..\Xperf -start D3D10Level9Logger -on %TRACE_D3D10LEVEL9% %TRACE_STAND_BUFFERS% -f D3D10Level9.etl
  280. "%~dp0"..\Xperf -capturestate D3D10Level9Logger %TRACE_D3D10LEVEL9%
  281. "%~dp0"..\Xperf -start MFLogger -on %TRACE_DSHOW%+%TRACE_VR%+%TRACE_DROP%+%TRACE_MF%+%TRACE_AE%+%TRACE_DXVA2%+%TRACE_WME% %TRACE_STAND_BUFFERS% -f MF.etl
  282. "%~dp0"..\Xperf -start OLogger -on %TRACE_SCHEDULEGUID%+%TRACE_SC%+%TRACE_WIN32K%+%TRACE_DWM%+%TRACE_DWM2%+%TRACE_DWM3% %TRACE_STAND_BUFFERS% -f Other.etl
  283. "%~dp0"..\Xperf -start XAMLLogger -on %TRACE_XAML%:4 %TRACE_STAND_BUFFERS% -f XAML.etl
  284. "%~dp0"..\Xperf -start D2DLogger -on %TRACE_D2D% %TRACE_STAND_BUFFERS% -f D2D.etl
  285. "%~dp0"..\Xperf -start D2DScenariosLogger -on %TRACE_D2DSCENARIOS% %TRACE_STAND_BUFFERS% -f D2DScenarios.etl
  286. set TLOG=NORMAL
  287. goto EndIt
  288.  
  289. :StartVerbose
  290. REM
  291. REM Start Verbose
  292. REM
  293. if %errorlevel% GTR 0 goto OSUsage
  294. "%~dp0"..\Xperf -setprofint 1221
  295. "%~dp0"..\Xperf -on %TRACE_NT_NORMAL% %TRACE_LARGE_BUFFERS% -f Kernel.etl
  296. "%~dp0"..\Xperf -start DxTest -on %TRACE_TESTFRAMEWORK%+%TRACE_TEST% %TRACE_STAND_BUFFERS% -f DxTest.etl
  297. "%~dp0"..\Xperf -start DxLogger -on %TRACE_DX% %TRACE_LARGE_BUFFERS% -f DX.etl
  298.  
  299. "%~dp0"..\Xperf -start DxcState -on %TRACE_DXC_ALL% %TRACE_LARGE_BUFFERS% -f DXCState.etl
  300. "%~dp0"..\Xperf -capturestate DxcState %TRACE_DXC_ALL%
  301. "%~dp0"..\Xperf -stop DxcState
  302. "%~dp0"..\Xperf -start DxcStackLogger -on %TRACE_DXC_STACKS% %TRACE_LARGE_BUFFERS% -f DXCStacks.etl
  303.  
  304. "%~dp0"..\Xperf -start DxcLogger -on %TRACE_DXC_NORMAL% %TRACE_LARGE_BUFFERS% -f DXC.etl
  305. "%~dp0"..\Xperf -start UMDLogger -on %TRACE_UMD% %TRACE_STAND_BUFFERS% -f UMD.etl
  306. "%~dp0"..\Xperf -capturestate UMDLogger %TRACE_UMD%
  307. "%~dp0"..\Xperf -start DXGILogger -on %TRACE_DXGI% %TRACE_STAND_BUFFERS% -f DXGI.etl
  308. "%~dp0"..\Xperf -capturestate DXGILogger %TRACE_DXGI%
  309. "%~dp0"..\Xperf -start Dx11Logger -on %TRACE_D3D11% %TRACE_STAND_BUFFERS% -f DX11.etl
  310. "%~dp0"..\Xperf -capturestate Dx11Logger %TRACE_D3D11%
  311. "%~dp0"..\Xperf -start D3D10Level9Logger -on %TRACE_D3D10LEVEL9% %TRACE_STAND_BUFFERS% -f D3D10Level9.etl
  312. "%~dp0"..\Xperf -capturestate D3D10Level9Logger %TRACE_D3D10LEVEL9%
  313. "%~dp0"..\Xperf -start MFLogger -on %TRACE_DSHOW%+%TRACE_VR%+%TRACE_DROP%+%TRACE_MF%+%TRACE_AE%+%TRACE_MMCSS%+%TRACE_WMDRM%+%TRACE_DXVA2%+%TRACE_WMP%+%TRACE_DVD%+%TRACE_WME% %TRACE_STAND_BUFFERS% -f MF.etl
  314. "%~dp0"..\Xperf -start OLogger -on %TRACE_HME%+%TRACE_HDDVD%+%TRACE_DWMAPIGUID%+%TRACE_SCHEDULEGUID%+%TRACE_SC%+%TRACE_WIN32K%+%TRACE_DWM%+%TRACE_DWM2%+%TRACE_DWM3%+%TRACE_CODEC% %TRACE_STAND_BUFFERS% -f Other.etl
  315. "%~dp0"..\Xperf -start XAMLLogger -on %TRACE_XAML%:5 %TRACE_STAND_BUFFERS% -f XAML.etl
  316. "%~dp0"..\Xperf -start D2DLogger -on %TRACE_D2D% %TRACE_STAND_BUFFERS% -f D2D.etl
  317. "%~dp0"..\Xperf -start D2DScenariosLogger -on %TRACE_D2DSCENARIOS% %TRACE_STAND_BUFFERS% -f D2DScenarios.etl
  318. set TLOG=VERBOSE
  319. goto EndIt
  320.  
  321.  
  322.  
  323.  
  324.  
  325. REM Stop Logging section
  326. :StopSection
  327. REM
  328. REM Here is where we determine how to shut things off
  329. REM
  330.  
  331. if "%TLOG%"=="MIN" goto StopMin
  332. if "%TLOG%"=="LIGHT" goto StopLight
  333. if "%TLOG%"=="LONGHAUL" goto StopLonghaul
  334. if "%TLOG%"=="NORMAL" goto StopNormal
  335. if "%TLOG%"=="VERBOSE" goto StopVerbose
  336. goto EndIt
  337.  
  338. :StopMin
  339. "%~dp0"..\Xperf -stop XAMLLogger
  340. "%~dp0"..\Xperf -stop DxLogger
  341. "%~dp0"..\Xperf -stop DxcStackLogger
  342. "%~dp0"..\Xperf -stop DxcLogger
  343. "%~dp0"..\Xperf -stop UMDLogger
  344. "%~dp0"..\Xperf -stop DXGILogger
  345. "%~dp0"..\Xperf -stop Dx11Logger
  346. "%~dp0"..\Xperf -stop D3D10Level9Logger
  347. "%~dp0"..\Xperf.exe -stop
  348. echo All loggers stopped, starting merge...
  349. "%~dp0"..\Xperf -merge XAML.etl DX.etl DXC.etl DXCStacks.etl UMD.etl DXGI.etl DX11.etl D3D10level9.etl kernel.etl DxcState.etl Merged.etl
  350. echo Restoring Performance Counter Interval
  351. "%~dp0"..\Xperf -setprofint
  352. set TLOG=
  353. goto EndIt
  354.  
  355. :StopLight
  356. "%~dp0"..\Xperf -stop XAMLLogger
  357. "%~dp0"..\Xperf -stop MFLogger
  358. "%~dp0"..\Xperf -stop DxLogger
  359. "%~dp0"..\Xperf -stop DxcStackLogger
  360. "%~dp0"..\Xperf -stop DxcLogger
  361. "%~dp0"..\Xperf -stop UMDLogger
  362. "%~dp0"..\Xperf -stop DXGILogger
  363. "%~dp0"..\Xperf -stop Dx11Logger
  364. "%~dp0"..\Xperf -stop D3D10Level9Logger
  365. "%~dp0"..\Xperf.exe -stop
  366. echo All loggers stopped, starting merge...
  367. "%~dp0"..\Xperf -merge XAML.etl MF.etl DX.etl DXC.etl DXCStacks.etl UMD.etl DXGI.etl DX11.etl D3D10level9.etl kernel.etl DxcState.etl Merged.etl
  368. echo Restoring Performance Counter Interval
  369. "%~dp0"..\Xperf -setprofint
  370. set TLOG=
  371. goto EndIt
  372.  
  373. :StopLonghaul
  374. "%~dp0"..\Xperf -stop DxcLogger
  375. "%~dp0"..\Xperf.exe -stop
  376. echo All loggers stopped, starting merge...
  377. "%~dp0"..\Xperf -merge DXC.etl kernel.etl Merged.etl
  378. echo Restoring Performance Counter Interval
  379. "%~dp0"..\Xperf -setprofint
  380. set TLOG=
  381. goto EndIt
  382.  
  383. :StopNormal
  384. REM
  385. REM To stop private provider
  386. REM Xperf -stop PriLogger
  387. REM
  388. "%~dp0"..\Xperf -stop XAMLLogger
  389. "%~dp0"..\Xperf -stop DxTest
  390. "%~dp0"..\Xperf -stop OLogger
  391. "%~dp0"..\Xperf -stop MFLogger
  392. "%~dp0"..\Xperf -stop DxLogger
  393. "%~dp0"..\Xperf -stop DxcStackLogger
  394. "%~dp0"..\Xperf -stop DxcLogger
  395. "%~dp0"..\Xperf -stop UMDLogger
  396. "%~dp0"..\Xperf -stop DXGILogger
  397. "%~dp0"..\Xperf -stop Dx11Logger
  398. "%~dp0"..\Xperf -stop D3D10Level9Logger
  399. "%~dp0"..\Xperf -stop D2DLogger
  400. "%~dp0"..\Xperf -stop D2DScenariosLogger
  401. "%~dp0"..\Xperf.exe -stop
  402. echo All loggers stopped, starting merge...
  403. "%~dp0"..\Xperf -merge XAML.etl Other.etl MF.etl DX.etl DXC.etl DXCStacks.etl UMD.etl DXGI.etl DX11.etl D3D10level9.etl kernel.etl DxTest.etl D2D.etl D2DScenarios.etl DxcState.etl Merged.etl
  404. echo Restoring Performance Counter Interval
  405. "%~dp0"..\Xperf -setprofint
  406. set TLOG=
  407. goto EndIt
  408.  
  409. :StopVerbose
  410. "%~dp0"..\Xperf -stop XAMLLogger
  411. "%~dp0"..\Xperf -stop DxTest
  412. "%~dp0"..\Xperf -stop OLogger
  413. "%~dp0"..\Xperf -stop MFLogger
  414. "%~dp0"..\Xperf -stop DxLogger
  415. "%~dp0"..\Xperf -stop DxcStackLogger
  416. "%~dp0"..\Xperf -stop DxcLogger
  417. "%~dp0"..\Xperf -stop UMDLogger
  418. "%~dp0"..\Xperf -stop DXGILogger
  419. "%~dp0"..\Xperf -stop Dx11Logger
  420. "%~dp0"..\Xperf -stop D3D10Level9Logger
  421. "%~dp0"..\Xperf -stop D2DLogger
  422. "%~dp0"..\Xperf -stop D2DScenariosLogger
  423. "%~dp0"..\Xperf.exe -stop
  424. echo All loggers stopped, starting merge...
  425. "%~dp0"..\Xperf -merge XAML.etl Other.etl MF.etl DX.etl DXC.etl DXCStacks.etl UMD.etl DXGI.etl DX11.etl D3D10level9.etl kernel.etl DxTest.etl D2D.etl D2DScenarios.etl DxcState.etl Merged.etl
  426. echo Restoring Performance Counter Interval
  427. "%~dp0"..\Xperf -setprofint
  428. set TLOG=
  429. goto EndIt
  430.  
  431.  
  432. REM
  433. REM Error message section.
  434. REM
  435.  
  436. :OSUsage
  437. echo Error: Logging should be done on Vista capable OS.
  438. goto EndIt
  439.  
  440. :CLUsage
  441. echo Error: Invalid command line argument.
  442. goto EndIt
  443.  
  444. :EndIt
  445. @echo on
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top