Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
4658 Discussions

VTune : any way to only profile specific application functions/code sections using HPC Perf. Charac?

mikeitexpert
New Contributor II
490 Views

In my app, I have an initialization function running at beginning of the execution which I don't need to be profiled using HPC Performance Characterization analysis (in VTune). Also there are some other functions in the main body of the application which I want to exclude from data sampling and execution. 

 

Please let me know how I can possibly mark them up to be excluded from data sampling and analysis.

 

Many thanks.

0 Kudos
1 Solution
Bernard
Black Belt
472 Views

Please explore so called "ITT API".

You can insert markers into your code and narrow down the sampling to those specific regions (i.e function scope, base-block scope, loop scope). Be aware, that at the micro-architectural level does not exist binding between specfic block of machine code to the PMCs (performance counters).

Such a binding exists only for thread 0 and thread 1 (SMT) and for kernel/user mode sampling. In my opinion where the narrowing scope markers are used the VTune would simply filter out the samples belonging to other code blocks.

 

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/api-support/instru...

View solution in original post

4 Replies
Bernard
Black Belt
473 Views

Please explore so called "ITT API".

You can insert markers into your code and narrow down the sampling to those specific regions (i.e function scope, base-block scope, loop scope). Be aware, that at the micro-architectural level does not exist binding between specfic block of machine code to the PMCs (performance counters).

Such a binding exists only for thread 0 and thread 1 (SMT) and for kernel/user mode sampling. In my opinion where the narrowing scope markers are used the VTune would simply filter out the samples belonging to other code blocks.

 

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/api-support/instru...

Dmitry_P_Intel1
Employee
434 Views

Hello,

If you have an MPI application you can also use standard MPI_Pcontrol function to pause/resume collection specifying 0 or 1 as the function parameter value.

Thanks & Regards, Dmitry

JananiC_Intel
Moderator
417 Views

Hi,

 

Thanks for accepting the solution. If you need any additional information, please submit a new question as this thread will no longer be monitored.

 

Regards,

Janani Chandran

 

Bernard
Black Belt
407 Views

>>>Also there are some other functions in the main body of the application which I want to exclude from data sampling and execution. >>>

If you would like to achieve a "total" exclusion of some basic-blocks from profiling, then you may switch to counting mode and use ITT API to mark the regions some specific regions (i.e. basic blocks).

Probably there will be a some overhead of the call to the ITT API markers so the profiled region (by the counting mode) shall have a longer cycle count than  ITT API markers.

 

 

 

Reply