VT_Region Class Reference

Description

This is similar to VT_Function, but should be used to mark regions within a function.

The difference is that source code locations can be provided for the beginning and end of the region, and one instance of this class can be used to mark several regions in one function.

Constructor & Destructor Documentation

VT_Region()

Default constructor. Does not start a region.

VT_Region(const char *symname, const char *classname)

Enters the region upon creation.

VT_Region(const char *symname, const char *classname, const char *file, int line)

The same as the previous constructor, but also stores information about where the region is located in the source code.

VT_Region(VT_FuncDef &funcdef)

This is a more efficient version which supports defining the region only once.

VT_Region(VT_FuncDef &funcdef, VT_SclDef &scldef)

This is a more efficient version which supports defining the region and source code location only once.

~VT_Region()

The destructor marks the region exit.

Member Function Documentation

void begin(const char *symname, const char *classname)

Defines the region with VT_classdef() and VT_funcdef(), then enters it.

This is less efficient than defining the region once and then reusing the handle. Silently ignores errors, like for example, uninitialized Intel® Trace Collector.

Parameters:

symname the name of the region
classname the class this region belongs to

void begin(const char *symname, const char *classname, const char *file, int line)

The same as the previous begin(), but also stores information about where the region is located in the source code.

Parameters:

symname the name of the region
classname the class this region belongs to
file name of source file, may but does not have to include path
line line in this file where region starts

void begin(VT_FuncDef &funcdef)

This is a more efficient version which supports defining the region only once.

Parameters:

funcdef this is a reference to the (usually static) instance that defines and remembers the region handle

void begin(VT_FuncDef &funcdef, VT_SclDef &scldef)

This is a more efficient version which supports defining the region and source code location only once.

Parameters:

funcdef this is a reference to the (usually static) instance that defines and remembers the region handle
scldef this is a reference to the (usually static) instance that defines and remembers the scl handle

void end()

Leaves the region.

void end(const char *file, int line)

The same as the previous end(), but also stores information about where the region ends in the source code.

Parameters:

file name of source file, may but does not have to include path
line line in this file where region starts

void end (VT_SclDef &scldef)

This is a more efficient version which supports defining the source code location only once.

Parameters:

scldef this is a reference to the (usually static) instance that defines and remembers the scl handle.
For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)