Analyzers
Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4887 Discussions

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

mikeitexpert
New Contributor II
1,125 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
1,107 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/instrumentation-and-tracing-technology-apis.html

View solution in original post

4 Replies
Bernard
Black Belt
1,108 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/instrumentation-and-tracing-technology-apis.html

Dmitry_P_Intel1
Employee
1,069 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

0 Kudos
JananiC_Intel
Moderator
1,052 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

 

0 Kudos
Bernard
Black Belt
1,042 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.

 

 

 

0 Kudos
Reply