diff options
| author | Adonais Romero González <[email protected]> | 2020-03-26 11:18:09 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-26 11:18:09 -0700 |
| commit | dd4fad494b996f5729be98e0271ea74ef1a5d2ad (patch) | |
| tree | c880d395a1db3ac998eae9aa4ada7c9497a9a918 /video/IndirectDisplay/IddSampleDriver/Trace.h | |
| parent | 9b58d9a908a45a55452b87d001789d27fbf0e8ee (diff) | |
| parent | 3ba36f46f9ff71b33776f8e6acef52c44b9e0a35 (diff) | |
Add Indirect Display Driver sample (#459)132485
* Add Indirect Display Driver sample
* minor cleanup
* Update sample notification email
* Update inf with Pnplockdown=1
Co-authored-by: Shantanu Gupta <[email protected]>
Diffstat (limited to 'video/IndirectDisplay/IddSampleDriver/Trace.h')
| -rw-r--r-- | video/IndirectDisplay/IddSampleDriver/Trace.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/video/IndirectDisplay/IddSampleDriver/Trace.h b/video/IndirectDisplay/IddSampleDriver/Trace.h new file mode 100644 index 00000000..9852bab4 --- /dev/null +++ b/video/IndirectDisplay/IddSampleDriver/Trace.h @@ -0,0 +1,63 @@ +/*++ + +Module Name: + + Internal.h + +Abstract: + + This module contains the local type definitions for the + driver. + +Environment: + + Windows User-Mode Driver Framework 2 + +--*/ + +// +// Define the tracing flags. +// +// Tracing GUID - b254994f-46e6-4718-80a0-0a3aa50d6ce4 +// + +#define WPP_CONTROL_GUIDS \ + WPP_DEFINE_CONTROL_GUID( \ + MyDriver1TraceGuid, (b254994f,46e6,4718,80a0,0a3aa50d6ce4), \ + \ + WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \ + WPP_DEFINE_BIT(TRACE_DRIVER) \ + WPP_DEFINE_BIT(TRACE_DEVICE) \ + WPP_DEFINE_BIT(TRACE_QUEUE) \ + ) + +#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) + +// +// This comment block is scanned by the trace preprocessor to define our +// Trace function. +// +// begin_wpp config +// FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...); +// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...); +// end_wpp + +// +// +// Driver specific #defines +// + +// TODO: Use a unique driver tracing ID here, +// see https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/adding-wpp-software-tracing-to-a-windows-driver +#define MYDRIVER_TRACING_ID L"Microsoft\\UMDF2.25\\IddSampleDriver v1.0" |
