User Guide

  • 2022.2
  • 08/08/2022
  • Public Content


These are wrappers around the C API calls which simplify instrumentation of C++ source code and ensure correct tracing if exceptions are used. Because all the member functions are provided as inline functions it is sufficient to include
to use these classes with every C++ compiler.
Here are some examples how the C++ API can be used.
uses the simpler interface without storing handles, while
saves these handles in static instances of the definition classes for later reuse when the function is called again:
void nohandles() { VT_Function func( "nohandles", "C++ API", __FILE__, __LINE__ ); } void handles() { static VT_SclDef scldef( __FILE__, __LINE__ ); // VT_SCL_DEF_CXX( scldef ) could be used instead static VT_FuncDef funcdef( "handles", "C++ API" ); VT_Function func( funcdef, scldef ); } int main( int argc, char **argv ) { VT_Region region( "call nohandles()", "main" ); nohandles(); region.end(); handles(); handles(); return 0; }

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at