Intel® VTune™ Amplifier XE and Intel® VTune™ Amplifier for Systems Help
Use the frame API to insert calls to the desired places in your code and analyze performance per frame, where frame is the time period between frame begin and end points. When frames are displayed in Intel® VTune™Amplifier , they are displayed in a separate track, so they provide a way to visually separate this data from normal task data.
Frame API is a per-process function that works in resumed state. This function does not work in paused state.
You can run the frame analysis to:
Frames represent a series of non-overlapping regions of Elapsed time. Frames are global in nature and not connected with any specific thread. ITT APIs that enable analyzing code frames and presenting the analysis data.
Use This Primitive |
To Do This |
||||||
---|---|---|---|---|---|---|---|
void __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id); |
Define the beginning of the frame instance. An __itt_frame_begin_v3 call must be paired with an __itt_frame_end_v3 call. Successive calls to __itt_frame_begin_v3 with the same ID are ignored until a call to __itt_frame_end_v3 with the same ID.
|
||||||
void __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id); |
Define the end of the frame instance. A __itt_frame_end_v3 call must be paired with a __itt_frame_begin_v3 call. The first call to __itt_frame_end_v3 with a given ID ends the frame. Successive calls with the same ID are ignored, as are calls that do not have a matching __itt_frame_begin_v3 call.
|
The analysis types based on the hardware event-based sampling collection are limited to 64 distinct frame domains.
The following example uses the frame API to capture the Elapsed times for the specified code sections.
#include "ittnotify.h"
__itt_domain* pD = __itt_domain_create( L"My Domain" );
pD->flags = 1; /* enable domain */
for (int i = 0; i < getItemCount(); ++i)
{
__itt_frame_begin_v3(pD, NULL);
do_foo();
__itt_frame_end_v3(pD, NULL);
}
…
__itt_frame_begin_v3(pD, NULL);
do_foo_1();
__itt_frame_end_v3(pD, NULL);
…
__itt_frame_begin_v3(pD, NULL);
do_foo_2();
__itt_frame_end_v3(pD, NULL);