Intel® Inspector User Guide for Windows* OS

ID 767798
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

API Support

NOTE:

Sanitizers in Intel® oneAPI DPC++/C++ Compiler and Intel® Fortran Compiler help effectively pinpoint memory, address, threading, and undefined behavior related issues early in the development process. Sanitizers offer faster time to results, fewer false positives, and improved compiler integration compared to Intel Inspector. As a result, Intel Inspector will no longer be included in the Intel® HPC Toolkit. It continues to be downloadable as a standalone package and it will be discontinued in 2025 or later. Customers who have purchased Intel® Priority Support will continue to receive support. Please see Intel Inspector deprecation article for more information.

Intel® Inspector provides API support that allows you to:

  • Gather semantic information related to your synchronization constructs.

  • Identify the semantics of your malloc-like heap management functions.

  • Specify which parts of your application should be analyzed.

Applications or modules linked to the static API library do not have a runtime dependency on a dynamic library, so they can be executed independently of Intel Inspector and other Intel studio tools.

NOTE:
  • There are no Java or .NET APIs. If you need runtime environment support, you can use a JNI, or C/C++ function call from the managed code. If the collector causes significant overhead or data storage, you can pause the analysis to reduce the overhead.

  • For information on Windows* OS API support, see the Appendix.

Using C/C++ and Fortran APIs

The default Intel Inspector installation path, <install-dir>, is below C:\Program Files (x86)\Intel\oneAPI\inspector\latest (on certain systems, the directory is Program Files).

  1. Specify this file in your code:

    • For C/C++, include <install-dir>\include\ittnotify.h

    • For Fortran, use <install-dir>\include\<ia32|intel64>\ittnotify.mod

  2. Insert __itt_* notifications in appropriate places in your code.
  3. Link to this file:

    • For C/C++, link to <install-dir>\<lib32|lib64>\libittnotify.lib

    • For Fortran, link to <install-dir>\<lib32|lib64>\libittnotify.lib

Conditional Compilation for Release Versions

For best performance in the release version of your code, use conditional compilation to turn off all annotations. To eliminate all __itt_* functions from your code during compilation of the release version, define the macro INTEL_NO_ITTNOTIFY_API before including ittnotify.h.

You can also define this macro to remove the static library during the linking stage.