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

Vtune

Akhilesh_Naidu
Beginner
5,157 Views

Hi,

I am using Vtune for a multi-threading project, Vtune works fine when I go for performance snapshot but when I go for Hotspot analysis or Threading analysis it hangs.

I am using Tcmalloc in this project. Does Vtune work for Tcmalloc?

Thanks,

Labels (2)
0 Kudos
1 Solution
RaeesaM_Intel
Moderator
5,096 Views

Hi Akhilesh,

Thank you for sharing the details.

 

We could observe from the self-checker log that some collections are failed.

HW event-based analysis check

Example of analysis types: General Exploration

Collection: Fail

amplxe: Error: This analysis type requires either an access to system-wide monitoring in the Linux perf subsystem or installation of the VTune Amplifier drivers (see the "Sampling Drivers" help topic for further details). Please set the /proc/sys/kernel/perf_event_paranoid value to 0 or less to continue without installing the drivers.

 

As mentioned in the error log, set the perf_event_paranoid value to 0 and see whether it solves the issue.

Also, try profiling the sample matrix application that comes along with vtune to make sure that the issue is not with the application. You can find the sample application in the below path

<install-dir>/samples/en/C++/matrix

 

Steps :

·      Source <vtune-install-directory >/vtune-vars.sh

·      cd <vtune-install-dir>/samples/en/C++/matrix

·      vtune -collect hotspots -result-dir r000hs ./matrix

Let us know if it hang for this sample too.

 

Regards,

Raeesa


View solution in original post

0 Kudos
8 Replies
RaeesaM_Intel
Moderator
5,140 Views

Hi,


Thanks for reaching out to us.

We are checking your query internally, will get back to you on the updates.


Regards,

Raeesa


0 Kudos
RaeesaM_Intel
Moderator
5,131 Views

 

Hi,

Thank you for giving us time.

 

There is less possibility that TCMalloc can cause an application to hang when profiled using VTun and we haven’t observed any known issues before. Could you please share the following details for further debugging :

1.      VTune version

2.      Host OS

3.      Make sure that VTune self check script is running fine to validate that appropriate drivers are installed and the system is set up properly to collect performance data. See whether its working fine and share the log.

The self-check file for windows “vtune-self-checker.bat” and for linux “vtune-self-checker.sh” will be there in the <vtune-installation-directory>/bin64 folder if the VTune installation was done successfully.

4.      Is it the application that hangs or the VTune collection that hang up ? Could you please elaborate more or share the error log(if any) after running the analysis.

 

Raeesa

 

0 Kudos
Akhilesh_Naidu
Beginner
5,119 Views

Hi,

Vtune is working fine when we start Performance Snapshot, But once we start Hotspot analysis(user-sampling mode) or Threading Analysis the collection of data hangs. PFB the details about the host machine.

1. OS version : Centos7.6

2. Vtune Version : Intel Vtune Profiler 2020 update 3

 Attaching Screenshot of vtune-self-checker.sh

0 Kudos
RaeesaM_Intel
Moderator
5,097 Views

Hi Akhilesh,

Thank you for sharing the details.

 

We could observe from the self-checker log that some collections are failed.

HW event-based analysis check

Example of analysis types: General Exploration

Collection: Fail

amplxe: Error: This analysis type requires either an access to system-wide monitoring in the Linux perf subsystem or installation of the VTune Amplifier drivers (see the "Sampling Drivers" help topic for further details). Please set the /proc/sys/kernel/perf_event_paranoid value to 0 or less to continue without installing the drivers.

 

As mentioned in the error log, set the perf_event_paranoid value to 0 and see whether it solves the issue.

Also, try profiling the sample matrix application that comes along with vtune to make sure that the issue is not with the application. You can find the sample application in the below path

<install-dir>/samples/en/C++/matrix

 

Steps :

·      Source <vtune-install-directory >/vtune-vars.sh

·      cd <vtune-install-dir>/samples/en/C++/matrix

·      vtune -collect hotspots -result-dir r000hs ./matrix

Let us know if it hang for this sample too.

 

Regards,

Raeesa


0 Kudos
Akhilesh_Naidu
Beginner
5,095 Views

Hi Raeesa,

Greetings of the day!

I have used Vtune for matrix multiplication as well as for some other projects of mine. For this particular Project the data collection hangs. I tried it from the command line, when I stop the collection( CTRL + C) it shows some results. So the main problem is, It is not able to complete the collection for this multi-threading project.(This is the case with every project that uses TCmalloc)

Thanks,

Akhilesh

 

0 Kudos
Kirill_U_Intel
Employee
5,088 Views

Hi.

Is it possible to share some small test application for reproducing on our side?

I've created some test but no issues with hotspots and threading

 

#include <stdlib.h>
#include <cstring>

int main () {
   char *tmp;
   for (int i = 0; i < 10000; i++)
   {
       for (int j = 0; j < 10000; j++)
       {
           tmp = (char *) malloc(8 * 1024);
           strcpy(tmp, "intel");
           tmp = (char *) realloc(tmp, 16 * 1024);
           strcat(tmp, ".com");
           free(tmp);
       }
   }
   return(0);
}

 

 

Kirill

0 Kudos
Akhilesh_Naidu
Beginner
5,062 Views

Hi team,

I followed the steps given by Raeesa and it worked for me by changing the /proc/sys/kernel/perf_event_paranoid value to 0.

Thankyou for the help.

0 Kudos
RaeesaM_Intel
Moderator
5,059 Views

Hi Akhilesh,


Glad to know that your issue is resolved and thank you for accepting the solution. We will no longer monitor this query. Please raise a new thread if you face any further issues.


Regards,

Raeesa



0 Kudos
Reply