Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
4752 Discussions

vtune Amplifier XE 2011 and taskset

amgastineau1
Beginner
217 Views
Hello,

I need to profile an application which requires to be run with the taskset command. Indeed, this application shares critical data between threads. These data are very frequently used/updates by the all threads. So we benefit to share caches by the multiple threads.
I run it with the following command :
taskset -c 0-7 myapplication
To profile, I want to use the following command vtune Amplifier XE 2011to collect porfiling data but it does report anything :
amplxe-cl -collect hotspotstaskset -c 0-7 myapplication
Collecting "hotspots" is not supported by "-target-pid".
How can I profile my application which requires to be placed on processors with taskset ?
Mickal
0 Kudos
2 Replies
Peter_W_Intel
Employee
217 Views
Hi,

The purpose of using "-target-pid" is to attach a running process, but I assume that you want to launch your application by the tool.

Since myapplication is not child process of taskset, you can use command like as - (use lightweight hotspots analysis)

amplxe-cl -collectlightweight-hotspots -result-dir r0001lh -- taskset -c 0-7 myapplication

Then view result like as -
amplxe-cl -report pmu-events -r r0001lh -filter module=myapplication -group-by function

Otherwise, manually run "taskset -c 0-7 myapplication", thenrun hotspots to attach running app-
amplxe-cl -collect hotspots -result-dir r0001hs -target-pid 1234
amplxe-cl -report hotspots -result-dir r001hs -group-by function -filter module=myapplication

Hope it helps.

Regards, Peter


Hope it helps

Mark_D_Intel
Employee
217 Views
I tried running a simple example with taskset under amplxe-cl, and it seems to work fine:

amplxe-cl -collect hotspots taskset -c 0-4 tests/few_thread
START
STOP
Using result path `r005hs'
Executing actions 74 % Generating a report

Summary
-------

Elapsed Time: 7.414
CPU Time: 12.368
Executing actions 99 % done


Which Linux distribution are you using?

Can you give more details about how it fails? Does the application run? Is a result directory produced (should be something like 'r000hs')? Does it work without taskset?
Reply