Intel® Thread Checker for Windows* - Instrumentation

Contents:


What is instrumentation?
Intel® Thread Checker instruments software before tracing it to find errors. Instrumentation adds benign Thread Checker library calls into the software to be traced. The Thread Checker library calls record information about threads, including memory accesses and APIs used, in order to find threading diagnostics including errors.

There are two different kinds of instrumentation: source and binary instrumentation.


What is source instrumentation?
Source instrumentation is added by the Intel® C++ or Fortran Compiler when C++ or Fortran source code is compiled with the -Qtcheck (Microsoft Windows*) .


What is binary instrumentation?
Binary instrumentation is added at run-time to an already built (made) binary module, including applications and dynamic or shared libraries. The instrumentation code isautomatically inserted when you run an Intel® Thread Checker activity in the VTune™ environment or the Microsoft .NET* Development Environment.Both Microsoft Windows* and Linux* executables can be instrumented for IA-32 processors, but not for Itanium® processors. Binary instrumentation can be used for software compiled with any of the supported compilers.


What system resources does instrumentation use?
The process of adding source or binary instrumentation to your software or takes time (CPU MIPs) and memory. Once the instrumentation has been added, your software will both run slower and use more memory that it usually does. This is because as your software runs, the Intel® Thread Checker library is recording the memory accesses and threading APIs that each thread uses.

Can source and binary instrumentation be used together?
Yes. Some source files of one module (applications and dynamic or shared libraries) can be compiled with source instrumentation (/Qtcheck) while other files use binary instrumentation. Some modulesof a process may use source instrumentation while others use binary instrumentation.


Which is better, source or binary instrumentation?
In general, you will get more detailed diagnostics from Intel® Thread Checker by using source instrumentation; however, you should get similar diagnostics by using either instrumentation method.


When using Microsoft Windows* threads, should I use source or binary instrumentation?
Either source or binary instrumentation can be used. If you're using one of the Microsoft Visual* C++ compilers, then it is probably easiest to use binary instrumentation. If you're using an Intel® Compiler and it's easy to re-compile your source code, then consider making an Intel® Thread Checker build using the /Qtcheck option. This will provide you with the most detailed diagnostics from Thread Checker.

When using OpenMP* threads, should I use source or binary instrumentation?
On Microsoft Windows* systems, either source or binary instrumentation can usually be used. However, if your software uses thread-count dependant OpenMP*, and then binary instrumentation should be used with the Intel® Compilers v8.0, or higher.

Note: If binary instrumentation is used for OpenMP* software that is compiled and run with the Intel® Compilers any v7.0, then Intel® Thread Checker will produce incorrect results.


When using binary instrumentation, what level should I use?
Generally using the default instrumentation level of "All Functions" is recommended for User code (applications or dynamic or shared libraries). If you're concerned that Intel® Thread Checker might be missing some diagnostics and you can afford for Thread Checker to use more memory, then consider using the "Full Image" level. You should not reduce the instrumentation level below "All Functions" for your User code because then Thread Checker may not produce an accurate and complete diagnostic list.


How do I set the default instrumentation levels?

  • In the VTune™ environment, you can set the default instrumentation levels via the Configure " Options... " Intel® Thread Checker " Collector " Instrumentation Levels dialog.
  • In the Microsoft .NET* Development Environment, you can set the default instrumentation levels via the Tools " Options... " VTune™ Performance Tools " Intel® Thread Checker " Collector " Instrumentation Levels dialog.

Note: Setting the default levels in one environment, such as the VTune environment, does not propagate the changes to other environments, such as the Microsoft .NET* Development Environment.


The instrumentation level names have changed. How do these correspond to the old level names?
T his table lists the instrumentation level names used for Intel® Thread Checker by version number:

Version 2.x

Version 1.0
Full Image All
Custom Image All (selective)
All Functions Partial
Custom Functions Partial (selective)
API Imports Not Applicable
Module Imports Minimal
 
For more complete information about compiler optimizations, see our Optimization Notice.

Comments

I have read your article , the meaning that is source instrumenation via /Qtcheck

bianary instrumenation is auto by Intel C++ compiler ?