Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 26, 2025

This PR completely migrates the XDP for Windows project from WPP (Windows Performance Preprocessor) to TraceLogging, addressing the pain points for both developers and end users mentioned in the issue.

Background

WPP, while functional, creates significant friction in the development process:

  • Requires complex preprocessor configuration and TMH file generation
  • Makes adding new trace points cumbersome
  • Has poor tooling support compared to modern alternatives
  • Creates build system complexity with WppEnabled, WppScanConfigurationData settings

Changes Made

Core XDP Driver (src/xdp/)

  • Converted inc/xdptrace.h from WPP macros to TraceLogging provider declarations
  • Added trace.c with TraceLogging provider implementation
  • Replaced WPP_INIT_TRACING/WPP_CLEANUP with TraceLogging initialization/cleanup
  • Removed WPP build configuration from xdp.vcxproj
  • Removed TMH includes from 10 source files

Supporting Libraries

  • RTL (src/rtl/): Removed WPP configuration, uses main XDP trace header
  • xdplwf (src/xdplwf/): Removed WPP configuration and TMH includes from 11 files

Test Projects

  • xdpmp (test/xdpmp/): Converted to separate TraceLogging provider with dedicated trace.c
  • fakendis (test/fakendis/): Converted to separate TraceLogging provider with dedicated trace.c
  • Functional tests (test/functional/inc/fntrace.h): Converted trace header
  • SpinXSK (test/spinxsk/): Converted trace header, removed TMH include

Architecture

The migration maintains a hybrid approach:

  • Cold path logging: TraceLogging for development/debugging traces (replaces WPP)
  • Hot path logging: Existing manifest-based ETW for performance-critical events (unchanged)

This preserves the performance characteristics of the hot path while dramatically improving the developer experience for cold path logging.

Compatibility

  • Maintained identical macro interfaces (TraceFatal, TraceError, TraceInfo, etc.)
  • Preserved original provider GUIDs for compatibility with existing tooling
  • Kept same trace flags and levels

Benefits

  • Simplified build system: No more WPP preprocessor steps or TMH file generation
  • Better developer experience: Easier to add new trace points without complex WPP syntax
  • Self-describing events: TraceLogging events include metadata automatically
  • Modern tooling support: Better integration with current Windows debugging tools
  • Reduced maintenance burden: Less complex build configuration to maintain

All WPP functionality has been successfully replaced with TraceLogging equivalents while maintaining full backward compatibility for trace consumers.

Fixes #529.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits August 26, 2025 13:03
Co-authored-by: mtfriesen <3517159+mtfriesen@users.noreply.github.com>
Co-authored-by: mtfriesen <3517159+mtfriesen@users.noreply.github.com>
Co-authored-by: mtfriesen <3517159+mtfriesen@users.noreply.github.com>
Co-authored-by: mtfriesen <3517159+mtfriesen@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace WPP with TraceLogging Replace WPP with TraceLogging across XDP codebase Aug 26, 2025
Copilot AI requested a review from mtfriesen August 26, 2025 13:17
Copilot finished work on behalf of mtfriesen August 26, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace WPP with TraceLogging

2 participants