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

Pause /Resume API on Amplfier XE 2016

ipasichnyk
Novice
822 Views

I try to repeat the steps described in the article using the newer 2016 version of Vtune Amplifier XE. However the behaviour of the test run is not correct.

The build command is the following:

icpc -g -mmic test_itt.cpp $AMPLIFIER_XE_INC -L$AMPLIFIER_XE_BASE/bin64/k1om -littnotify -lpthread -o test_mic

I run application natively form the host on a coprocessor:

amplxe-cl -collect advanced-hotspots --target-system=mic-native:mic0 --search-dir=. -start-paused /home/test_mic

and obtain the following (snippet):

amplxe: Warning: Pause command is not supported for managed code profiling. Runtime overhead is still possible. Data size limit may be exceeded.
amplxe: Collection paused.
Sampling session is already stopped
The sampling collection paused.
amplxe: Collection resumed.
The sampling collection resumed.
amplxe: Collection stopped.

It is clear wrong behaviour since I expect two resumes and two pauses. Moreover the messages are not clear to me at all. Why there are some without "amplxe:" prefix which apparently only repeat information?

0 Kudos
2 Replies
Dmitry_P_Intel1
Employee
822 Views

Hello Igor,

Yes we had duplicated messages - one from VTune runtool infra (prefixed) and the second from the sampling collector itself.

The problem with the fact that you see only one resume/pause pair messages instead of two seems more severe. Could you publish your test case to reproduce the behavior?

Also what update of 2016 do you use?

Thanks & Regards, Dmitry

 

0 Kudos
ipasichnyk
Novice
822 Views

Hi Dmitry,

I use Update 3 (build 463186) of Amplifier XE 2016

Here is my code:

// test_api.cpp : Defines the entry point for the console application.
#include "stdio.h"
#include "ittnotify.h"

void foo_data_collected()
{
   for (int i=0; i<10000000L; i++);
}
void foo_data_not_collected()
{
   for (int i=0; i<10000000L; i++);
}
int main(int argc, char* argv[])
{
   // Assume that data collector was paused in user interface
   foo_data_not_collected();
   // Now resume data collecting
   __itt_resume();
   foo_data_collected();
   // Pasue data collecting again
   __itt_pause();
   foo_data_not_collected();
   // Resume data collecting again
   __itt_resume();
   foo_data_collected();
   // The user shouldn't see data collecting in foo_data_not_collected() in result
   return 0;
}

Best,

Igor

0 Kudos
Reply