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

__itt_resume/__itt_pause does not work for "Performance Snapshot"

heysweetethan
Beginner
1,181 Views

Hi,

 

Does __itt_resume/__itt_pause work for "Performance Snapshot"?

 

It works for other analysis such as "Hotspots", "Threading" and etc.

The version of my VTune is 2022.2.0.

 

Thank you.

 

Ethan Kim

 

0 Kudos
5 Replies
ShyamS_Intel
Moderator
1,141 Views

Thank you for posting in Intel Communities. 

itt_resume() and itt_pause() works fine with performance snapshot. It might not be visible in the results but there will be some difference in the elapsed time. We tried using itt_resume() and itt_pause() functions in a sample code and did performance snapshot analysis and we could observe some difference in the elapsed time.


If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you! 


Regards,

Shyam Sundar


0 Kudos
heysweetethan
Beginner
1,111 Views

Thank you for your reply.

 

I'm still not sure that __itt_resume works for 'Performance Snapshot'.

 

Below is a sample source code that I made just for this.

I compiled it as 'VS2019 Console Application x64 Release' with all other configuration being default.

 

#include <iostream>
#include <thread>

#include "C:/Program Files (x86)/Intel/oneAPI/vtune/latest/include/ittnotify.h"
#pragma comment(lib, "C:/Program Files (x86)/Intel/oneAPI/vtune/latest/lib64/libittnotify.lib")

int main()
{
	double dSum = 0.0;

	__itt_resume();
	std::this_thread::sleep_for(std::chrono::seconds(5));
	for (int i = 0; i < INT_MAX; i++)
		dSum += 1.0;
	std::this_thread::sleep_for(std::chrono::seconds(5));
	__itt_pause();

	std::cout << dSum;
}

 

If I start 'Hotspots' by clicking 'Start Paused', 'Collection is paused' changes to 'Collecting Hotspots data'.

heysweetethan_5-1659661213536.png    =>   heysweetethan_4-1659660913624.png

If I start 'Performance Snapshot' by clicking 'Start Paused', 'Collection is paused' does not change to 'Collecting ... data'.

heysweetethan_1-1659660723932.png

 

Can you take a look at this?

 

Thank you again.

 

Best Regards,

Ethan Kim

0 Kudos
ShyamS_Intel
Moderator
1,088 Views

Hi,

 

We used the same code which you provided and it worked fine while performance snapshot.

ShyamS_Intel_0-1660125704127.png

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you! 

 

Regards,

Shyam Sundar

 

0 Kudos
heysweetethan
Beginner
1,076 Views

Thank you for your reply.

 

Just for sure, did you start analysis with "Start Paused"?

heysweetethan_5-1660186409426.png

 

Very awkward situation happens to me.

 

If I run VTune as administrator, it seems that _itt_resume does NOT work. Please see below.

heysweetethan_7-1660186556227.png  heysweetethan_1-1660186212370.png

 

If I run VTune 'NOT' as administrator, __itt_resume does work. Please see below.

heysweetethan_3-1660186319529.png  heysweetethan_4-1660186342893.png

 

I will try with a whole new PC.

My current PC has an antivirus program and Symatec Data Loss Prevention solution installed. Can these disturb VTune?

 

Best Regards, 

Ethan Kim

 

0 Kudos
ShyamS_Intel
Moderator
1,004 Views

Hi,

 

We are working on this internally.

 

Will let you know once we get an update.

 

Thanks

Shyam Sundar

 

0 Kudos
Reply