Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

Defining code regions to profile

Maxim_V_
Beginner
417 Views

Is there any way to define code regions (functions, modules etc) or time frame to profile and ignore anything else. For instance, if I have an application which sets up a large collection of objects (which takes a lot of CPU resources) then runs a relatively fast function A and exits, can I make VTune ignore anything except for A? I know that it is possible to zoom in using the timeline, but I'd rather send notifications from the application. Something like:

PrepareObjects();

StartCollectingData();

A();

StopCollectingData();

Or it would be nice to somehow select functions/classes of interest.

Is it possible in VTune?

0 Kudos
5 Replies
David_A_Intel1
Employee
417 Views

Yes!  Please see the product documentation for information about the pause and resume functions (see Collection Control APIs).

0 Kudos
Bernard
Valued Contributor I
417 Views
Maxim, please read this link://software.intel.com/en-us/articles/use-new-pause-and-resume-api-from-intel-vtune-amplifier-xe-2011
0 Kudos
Peter_W_Intel
Employee
417 Views

If works on Fortran code, please refer to this, in part 2.

0 Kudos
Maxim_V_
Beginner
417 Views

Thank you all. __itt_pause() and __itt_resume() did the trick. Although I had to wrap them into a dll because I'm trying to profile a .NET app.

0 Kudos
Bernard
Valued Contributor I
417 Views

Maxim,

you are welcome.

0 Kudos
Reply