Community
cancel
Showing results for 
Search instead for 
Did you mean: 
erang
Beginner
92 Views

"Sampling API Error" when trying to pause/resume sampling

I am trying to use __itt_pause() and __itt_resume() to filter out certain parts of my code which I do not want sampled. I am running "Lightweight Hotspots" in Amplifier XE 2011 in Visual Studio 2008. When I run my code I get lots of printouts to console including these types of messages

...
The sampling collection resumed.
The sampling collection paused.
Sampling API Error: resume sampling collection failed.
Sampling API Error: pause sampling collection failed.
The sampling collection resumed.
The sampling collection paused.
...

1. Why am I getting the "Sampling API Error"? I saw another thread (http://software.intel.com/en-us/forums/showthread.php?t=78961&o=a&s=lr) that indicated there may be issues with frequent collection switching (though no definitive answer was given in the end).
2. Why is the API printing to console at all (even when no error)??? This would just slow down the program's execution, no?


This problem may be observed in test code as simple as the following
test2.cpp

Any help would be appreciated,
Eran.
0 Kudos
3 Replies
Jackson_M_Intel
Employee
92 Views

Hello,

Did you also submit an issue to Premier support with the same information?

Thanks.
Tomer_Yanir
Beginner
92 Views

Yes, it was submitted to support under this account name.
Jackson_M_Intel
Employee
92 Views

To avoid duplication, I will handle the issue there and post the resolution once it is determined.

Thanks.

Reply