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

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

erang
Beginner
349 Views
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
349 Views
Hello,

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

Thanks.
0 Kudos
Tomer_Yanir
Beginner
349 Views
Yes, it was submitted to support under this account name.
0 Kudos
Jackson_M_Intel
Employee
349 Views

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

Thanks.

0 Kudos
Reply