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

vtune Amplifier XE 2011 and taskset

amgastineau1
Beginner
832 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
832 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

0 Kudos
Mark_D_Intel
Employee
832 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?
0 Kudos
Reply