Tutorial

  • 11/18/2019
  • Public Content

Summary

Intel® Inspector
is a dynamic memory and threading error checking tool for users developing serial and multithreaded applications on Windows* and Linux* operating systems. This topic is part of a
tutorial
that shows how to find and fix
threading
errors using the
Intel Inspector
and a
C++
sample application.
This tutorial demonstrated an end-to-end workflow you can ultimately apply to your own applications.
Step
Tutorial Recap
Key Tutorial Take-aways
1. Set up
You built the application using optimal compiler/linker settings, ensured the application runs on your system outside the
Intel Inspector
, set up the
Intel Inspector
environment, and created a project to hold analysis results.
Applications compiled and linked in debug mode using the following options produce the most accurate and complete analysis results:
-g
,
-O0
,
-shared-intel
for Intel® compilers, or default or
-Bdynamic
for GNU compilers, and no
-fmudflap
.
2. Collect result
You chose an analysis type and ran an analysis. During analysis, the
Intel Inspector
:
  • Ran the application, identified errors that may need handling, collected a result, and displayed the result in a result tab.
  • Added a pointer to the result in the
    Project Navigator
    .
  • Intel Inspector
    offers preset analysis types to help you control analysis scope and cost. Widening analysis scope maximizes the load on the system, and the time and resources required to perform the analysis.
  • Run error analyses from the
    File
    menu,
    toolbar, or command line using the
    inspxe-cl
    command.
3. Investigate result
You explored detected problems, interpreted the result data, accessed an editor directly from the Intel Inspector, and changed source code.
  • Key terms: A
    code location
    is a fact the
    Intel Inspector
    observes at a source code location. A
    problem
    is one or more occurrences of a detected issue. A
    problem set
    is a group of problems with a common problem type and a shared code location that might share a common solution.
  • Think of the
    Problems
    pane on the
    Summary
    window as a
    to-do
    list: Start at the top and work your way down.
  • Double-click a code location or problem on the
    Summary
    window to navigate to the
    Sources
    window. Click the
    Summary
    button on the
    Sources
    window to return to the
    Summary
    window.
  • Right-click various places on the
    Summary
    or
    Sources
    window to display a context menu, then choose
    Explain Problem
    to access more information on interpreting and resolving the problem.
  • Double-click a code location on the
    Sources
    window to open an editor.
4. Check your work
You recompiled, relinked, and reinspected the application.
Next step
: Prepare your own application(s) for analysis. Then use the
Intel Inspector
to find and fix errors.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804