The trace message format (TMF) file is a structured text file that contains instructions for parsing and formatting the binary trace messages that a trace provider generates. The formatting instructions are included in the trace provider's source code and are added to the trace provider's PDB symbol file by the WPP preprocessor.
Some tools that log and display formatted trace messages require a TMF file. Tracefmt and TraceView, WDK tools that format and display trace messages, can use a TMF file or they can extract the formatting information directly from a PDB symbol file.
TMF files are created automatically during the build process when the trace provider is specified in a place file. By default, the TMF files are located in the TraceFormat subdirectory of your Symbol File path. However, you can specify the destination path in the %TRACE_FORMAT_SEARCH_PATH% environment variable.
If you do not have a TMF file for a trace provider, use Tracepdb. Tracepdb extracts the formatting instructions from the PDB symbol file and creates a TMF file to store them. Many application and driver developers prefer shipping a TMF file, rather than a PDB symbol file.
The name of the TMF file is the message GUID of the messages associated with that TMF file. ETW uses the message GUID to associate particular trace messages with the TMF file that holds their formatting instructions.
A TMF file contains the following data:
The name of the PDB file from which the TMF file data was extracted.
The message GUID of the trace messages in the source file and the source file name.
For each trace message, an entry that specifies the message type, the source code file name, a line number, a message number, a message definition string, a trace flag name, and the name of the C function that contains the macro call.
A list of variables whose values appear in the trace messages and their associated internal type names. The variables are represented by the %n notation in a message definition string.
Note The TMF file is reserved for internal use, and its format is subject to change between different versions of Windows.