Can I optimize the conditional checks that the WPP macros produce before the tracing?

You can remove the conditional check for WPP_INIT_TRACING so that it is not called through the WPP macros. You can do this only if WPP_INIT_TRACING is called before any attempt to trace is made within the source code of your trace provider, such as a kernel-mode driver or user-mode application.

Important  You should not remove this check if tracing is made in your object constructors or macros. Otherwise, access violations could occur in your trace provider.

Before you include the trace message header (.tmh) file in your source code, add the following definition to disable the conditional check for WPP_INIT_TRACING:

#define WPP_CHECK_INIT