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

"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.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,

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

Thanks.

Yes, it was submitted to support under this account name.

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

Thanks.

Leave a Comment

Please sign in to add a comment. Not a member? Join today