summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuri.benditovich@daynix.com <yuri.benditovich@daynix.com>2017-07-09 10:54:25 +0300
committerFrediano Ziglio <fziglio@redhat.com>2017-07-09 09:46:36 +0100
commitef4d85ec2cac14732f6017163ab35871567f0793 (patch)
tree9f9bedc63777a0f8183a149f0129d56123f90133
parent454a66a25ab5550e2d0ca7df2c24df7194df6e53 (diff)
qxl-wddm-dod: Add scripts for ETW recording and parsing
QxlDodCollectTrace.bat intended for recording of binary traces in end-user environment (end-user runs it when instructed). It uses built-in Windows ability of collecting ETW data. QxlDodParseTrace.bat is to be used by developer to convert received binary traces to formatted text. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--QxlDodCollectTrace.bat31
-rw-r--r--QxlDodParseTrace.bat10
2 files changed, 41 insertions, 0 deletions
diff --git a/QxlDodCollectTrace.bat b/QxlDodCollectTrace.bat
new file mode 100644
index 0000000..29ccde5
--- /dev/null
+++ b/QxlDodCollectTrace.bat
@@ -0,0 +1,31 @@
+:: Place this script to any writable directory
+:: on the machine and run it as administrator
+:: recorded binary file qxldod.etl will be created in the same directory
+::
+:: parameter "4" in 'logman update' sets logging level to INFO
+:: change it to "5" for VERBOSE
+::
+
+@echo off
+
+net session >nul 2>&1
+if %errorlevel% equ 0 goto :admin_ok
+echo This script shall run with administrator rights
+pause
+goto :eof
+
+
+:admin_ok
+pushd "%~dp0"
+logman stop qxldod -ets >nul 2>&1
+logman delete qxldod -ets >nul 2>&1
+logman create trace qxldod -o qxldod.etl -ow -ets
+logman update qxldod -p {756ABE50-54E3-4A05-B5BB-F0112C75B18A} 0x7fffffff 4 -ets
+echo Recording started.
+echo Reproduce the problem, then press ENTER
+pause > nul
+logman stop qxldod -ets
+dir qxldod.etl
+echo Please collect qxldod.etl file now
+pause
+popd
diff --git a/QxlDodParseTrace.bat b/QxlDodParseTrace.bat
new file mode 100644
index 0000000..74d5265
--- /dev/null
+++ b/QxlDodParseTrace.bat
@@ -0,0 +1,10 @@
+@echo off
+set tmpname=%temp%\%RANDOM%%RANDOM%%RANDOM%.tmp
+if "%~1" equ "" goto :usage
+if "%~2" equ "" goto :usage
+"C:\Program Files (x86)\Windows Kits\10\tools\x86\traceview.exe" -process "%~1" -o %tmpname% -pdb "%~2" -nosummary
+start notepad %tmpname%
+goto :eof
+:usage
+echo %~n0 ^<ETL trace file^> ^<PDB file^>
+goto :eof