Stopping a Trace

You can view the complete list of start options by running the following command:

xperf -help stop

You can stop a trace session by using the -stop [LoggerName] top-level option. For example, the following command stops the kernel logger:

xperf -stop "NT Kernel Logger"

The NT Kernel Logger is used as a default when the LoggerName argument is missing. Therefore, the kernel logging session can be stopped with the following simplified command:

xperf -stop 

Be aware that the -stop top-level option stops NT Kernel Logger without merging the trace. NT Kernel Logger can be stopped and merged with the following command:

xperf -stop -d trace.etl

The stop-and-merge top-level option, -dfilename, uses as input all traces that are stopped before it on the same Xperf command line. When no -stop [LoggerName] top-level options are present, -d assumes an implied -stop for the kernel logger. This simplification reduces the previous command to:

xperf -d trace.etl

In this example, the kernel logger is stopped and merged into the trace file Trace.etl. For more information about interpreting trace merges, see the Detailed Walkthrough topic.