Intel® Trace Analyzer and Collector User and Reference Guide

ID 767272
Date 3/31/2023
Public
Document Table of Contents

New Interface

To simplify the use of user-defined states, a new interface has been introduced for the collector utility of the Intel® Trace Analyzer and Collector. It manages the symbol handles automatically, freeing the user from the task of assigning and keeping track of symbol handles, and has a reduced number of arguments. Furthermore, the performance of the new functions has been optimized, reducing the overhead of recording state changes.

To define a new symbol, first create the respective activity by calling the VT_classdef() function. A handle for that activity is returned, and the symbol can be defined with it by calling VT_funcdef(). The returned symbol handle is passed, for example, to VT_enter() to record a state entry event.

VT_classdef

int VT_classdef (const char * classname, int * classhandle)

Description

Allocates a handle for a class name.

The classname may consist of several components separated by a colon :. Leading and trailing colons are ignored. Several colons in a row are treated as just one separator.

Fortran

VTCLASSDEF(classname, classhandle, ierr)

Parameters

classname name of the class

Return values

classhandle the integer it points to is set by Intel® Trace Analyzer and Collector

Returns error code

VT_funcdef

int VT_funcdef (const char * symname, int classhandle, int * statehandle)

Description

Allocates a handle for a state.

The symname may consist of several components separated by a colon :. If that's the case, then these become the parent class(es). Leading and trailing colons are ignored. Several colons in a row are treated as just one separator.

This is a replacement for VT_symdef() which doesn't require the application to provide a unique numeric handle.

Fortran

VTFUNCDEF(symname, classhandle, statehandle, ierr)

Parameters

symname name of the symbol
classhandle handle for the class this symbol belongs to, created with VT_classdef(), or VT_NOCLASS, which is an alias for "Application" if the symname does not contain a class name and ignored otherwise

Return values

statehandle the integer it points to is set by Intel® Trace Analyzer and Collector

Returns error code

#define VT_NOCLASS

Special value for VT_funcdef() – put function into the default class Application.