qxl-wddm-dod: add trace definition file for WPP

Added file with Windows trace preprocessor definitions,
required for generating trace messages.

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:23 +03:00 committed by Frediano Ziglio
parent 132ef96f84
commit 87b13cd8fc
2 changed files with 59 additions and 0 deletions

56
qxldod/WppTrace.h Normal file
View File

@ -0,0 +1,56 @@
/*
* Copyright 2013-2016 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#pragma once
//
// Define the tracing flags.
//
// Tracing GUID - {756ABE50-54E3-4A05-B5BB-F0112C75B18A}
//
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID( \
QxlDodTraceGuid, (756ABE50,54E3,4A05,B5BB,F0112C75B18A), \
\
WPP_DEFINE_BIT(TRACE_DRIVER) \
WPP_DEFINE_BIT(TRACE_DEVICE) \
WPP_DEFINE_BIT(TRACE_MEMORY) \
WPP_DEFINE_BIT(TRACE_TIMING) \
WPP_DEFINE_BIT(TRACE_HARDWARE) \
)
#define WPP_FLAG_LEVEL_LOGGER(flag, level) WPP_LEVEL_LOGGER(flag)
#define WPP_FLAG_LEVEL_ENABLED(flag, level) \
(WPP_LEVEL_ENABLED(flag) && \
WPP_CONTROL(WPP_BIT_ ## flag).Level >= level)
#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags)
#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \
(WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
#if DBG
#define WPP_INIT_TRACING(driver, regpath)
#define WPP_CLEANUP(driver)
#endif
//
// This comment block is scanned by the trace preprocessor to define our
// Trace function.
//
// begin_wpp config
// FUNC Trace{FLAG=TRACE_DRIVER}(LEVEL,MSG, ...);
// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);
// FUNC DbgPrint{FLAG=TRACE_DRIVER}(LEVEL, (MSG, ...));
// CUSTOM_TYPE(devprop, ItemEnum(DEVICE_REGISTRY_PROPERTY));
// end_wpp
//

View File

@ -34,6 +34,9 @@
<ClInclude Include="QxlDod.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="WppTrace.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BaseObject.cpp">