User and Reference Guide

  • 2021.1
  • 12/04/2020
  • Public Content
Contents

Collecting Execution Trace

Typical debugging workflows can be described as follows:
  • Backwards traversal:
    1. Determine the symptoms of the issue.
    2. Place a breakpoint at the place where the symptoms become apparent.
    3. Retrace the execution backwards by unwinding the call stack and checking callers.
      Drawback
      : In some cases, the call stack might not provide enough information to identify the issue, because it might have originated in a separate execution branch.
  • Forward traversal:
    1. Determine the hierarchy of function calls that lead to the symptom of the issue.
    2. Place a breakpoint at a function that leads to the issue.
    3. Single-step the execution until the symptoms are apparent.
      Drawback
      : Forward traversal might not work if you have to step through a large number of executions of a code piece to identify the issue. It can also be destructive to issues like race conditions, deadlocks, and others.
In such cases, execution trace can be helpful. Using execution trace, you can place a breakpoint at the location where the issues become apparent and review the code lines that have been executed up to this point.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.