Use the TraceCreateEntry function to create an entry in a trace file when trace is being performed.
The TraceCreateEntry function uses a single parameter packet structure, TCEREQUEST, that is defined in the trace.h file that is part of the Toolkit. Use the packet to specify the following information:
A parameter packet is a structure that contains values or parameters.
The TraceCreateEntry caller does not have to provide any logic to check whether you turned on the trace point. The TraceCreateEntry function performs all necessary checking.
Note: Some additional overhead exists when you use the TracecCreateEntry function without checking the state of the trace first. The trace service automatically time-stamps all trace entries that TraceCreateEntry creates.
For more information about these and other trace related functions, refer to Problem Determination APIs.
In the example that is described in Examples of Code when Instrumenting for FFST and Trace, the code calls the TraceCreateEntry function. This example logs two data variables for the trace point. The first variable is a 32-bit status code. The second variable is a 16-bit flag word:
An application program can add trace points to a program. The program adds trace points by using the TraceCreateEntry function. Refer to Problem Determination APIs for information about the TraceCreateEntry function.