| |||
| Home > Tracing Tutorial > Excluding a trace range to avoid tracing a function > Examining the captured trace | |||
Examine the captured trace in the Trace tab:
All program execution from while(1) onwards
is traced, except for the body of GetData().
Search for the first instance of GetData() in
the captured trace:
Click the Trace tab to display the captured trace.
Select Find Symbol Name... from the Find menu to display the Enter Value dialog box.
Enter GetData (without the parentheses).
Click Find. The first instance
of GetData in the captured trace is selected. An
example is shown in Figure 10.40.
Scroll through the captured trace. Observe that
only the function call to GetData() and the instructions
to return to main() are traced. An example is shown
in Figure 10.41.
Set another exclude range to exclude tracing of GetAverage():
Click the trace.c tab in the Code window.
Scroll down until the start of GetAverage() is
visible.
Right-click in the gray margin at line 169 to display the context menu.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.
Select Start of Excluded Trace Range (Instruction and Data) from the list of tracepoint types.
Click OK. The Start of Excluded Trace Range tracepoint is set.
Scroll down until the end of GetAverage() is
visible.
Right-click in the gray margin at line 175 to display the context menu.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.
Select End of Excluded Trace Range (Instruction and Data) from the list of tracepoint types.
Click OK. The End of Excluded Trace Range tracepoint is set.
Reload the image.
Click Run on
the Debug toolbar to start execution.
After
a short time, click Stop on the Debug toolbar
to stop execution. The captured trace is displayed in the Trace tab
of the Analysis window.
Search for the first instance of GetAverage() in
the captured trace.
Click the Trace tab to display the captured trace.
Select Find Symbol Name... from the Find menu to display the Enter Value dialog box.
Enter GetAverage (without the parentheses).
Click Find. The first instance
of GetAverage in the captured trace is selected.
Scroll a short way through the captured trace. Observe
that only the function calls to GetData() and GetAverage(),
and the instructions to return to main() are
traced. An example is shown in Figure 10.42.
Restart and stop execution again:
Click Run on
the Debug toolbar to restart execution.
After
a short time, click Stop on the Debug toolbar
to stop execution. No trace is captured in this case. Because there
is a Trace Start Point at line 60, tracing is disabled until the
Trace Start Point is passed. Execution must pass the Trace Start
Point to cause tracing to be enabled again. Therefore, to capture
trace again, you must reload the image before restarting execution.