qxl-wddm-dod: Support ETW for release version

Add ability to produce ETW (Event Tracing for Windows) to release
version of the driver to be able to record binary traces in case
of problem in customer environment for further analysis.
Logging of debug build is not changed.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
yuri.benditovich@daynix.com 2017-07-09 10:54:24 +03:00 committed by Frediano Ziglio
parent 87b13cd8fc
commit 454a66a25a
4 changed files with 15 additions and 1 deletions

View File

@ -12,6 +12,9 @@
#include "qxldod.h" #include "qxldod.h"
#include "qxl_windows.h" #include "qxl_windows.h"
#include "compat.h" #include "compat.h"
#if !DBG
#include "qxldod.tmh"
#endif
#pragma code_seg("PAGE") #pragma code_seg("PAGE")

View File

@ -10,6 +10,9 @@
#include "driver.h" #include "driver.h"
#include "QxlDod.h" #include "QxlDod.h"
#if !DBG
#include "driver.tmh"
#endif
#pragma code_seg(push) #pragma code_seg(push)
#pragma code_seg("INIT") #pragma code_seg("INIT")
@ -62,6 +65,8 @@ DriverEntry(
{ {
PAGED_CODE(); PAGED_CODE();
WPP_INIT_TRACING(NULL, NULL);
DbgPrint(TRACE_LEVEL_FATAL, ("---> KMDOD build on on %s %s\n", __DATE__, __TIME__)); DbgPrint(TRACE_LEVEL_FATAL, ("---> KMDOD build on on %s %s\n", __DATE__, __TIME__));
RTL_OSVERSIONINFOW versionInfo; RTL_OSVERSIONINFOW versionInfo;
@ -157,6 +162,7 @@ DodUnload(VOID)
{ {
PAGED_CODE(); PAGED_CODE();
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--> %s\n", __FUNCTION__)); DbgPrint(TRACE_LEVEL_INFORMATION, ("<--> %s\n", __FUNCTION__));
WPP_CLEANUP(NULL);
} }
NTSTATUS NTSTATUS

View File

@ -10,7 +10,7 @@
#pragma once #pragma once
#include "BaseObject.h" #include "BaseObject.h"
#include "WppTrace.h"
extern "C" extern "C"
DRIVER_INITIALIZE DriverEntry; DRIVER_INITIALIZE DriverEntry;

View File

@ -185,6 +185,8 @@
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH);.\Include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH);.\Include</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<WppScanConfigurationData>WppTrace.h</WppScanConfigurationData>
<WppEnabled>true</WppEnabled>
</ClCompile> </ClCompile>
<PostBuildEvent> <PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X86,6_3_X86</Command> <Command>Inf2Cat /driver:$(OutDir) /os:8_X86,6_3_X86</Command>
@ -255,6 +257,8 @@
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH);.\Include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH);.\Include</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<WppScanConfigurationData>WppTrace.h</WppScanConfigurationData>
<WppEnabled>true</WppEnabled>
</ClCompile> </ClCompile>
<PostBuildEvent> <PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X64,Server8_X64,Server6_3_X64,6_3_X64</Command> <Command>Inf2Cat /driver:$(OutDir) /os:8_X64,Server8_X64,Server6_3_X64,6_3_X64</Command>
@ -277,6 +281,7 @@
<ClInclude Include="driver.h" /> <ClInclude Include="driver.h" />
<ClInclude Include="QxlDod.h" /> <ClInclude Include="QxlDod.h" />
<ClInclude Include="resource.h" /> <ClInclude Include="resource.h" />
<ClInclude Include="WppTrace.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="BaseObject.cpp" /> <ClCompile Include="BaseObject.cpp" />