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

How to know who holds the lock in vtune

Aleksei_A_1
Beginner
402 Views

Hi,

  We have spin locks from TBB (rw). I am interested to know who owns the lock. Yes, we have information who spins at particular object, but where is that guy who holds a lock? How to identify it?

Thanks!

0 Kudos
4 Replies
Peter_W_Intel
Employee
402 Views

You can use "Grouping" to "Sync Object / Thread / Function" to know objects works at different thread/function, in bottom-up report.

locksandwaits.png

0 Kudos
Aleksei_A_1
Beginner
402 Views

We'll try that, thanks a lot!

0 Kudos
David_A_Intel1
Employee
402 Views

Also notice that the callstack pane can show several types of call stacks:

locks-callstack.png

And the associated help info.  (Although, I noticed that "Spin Time" is missing from the documentation - defect filed.)

0 Kudos
Peter_W_Intel
Employee
402 Views

Alternatively, (on command line) list sync objects which belongs to different thread, function (I posted for GUI at 5/15/2015 11:22). Use (for example):

# amplxe-cl -R hotspots -group-by sync-obj,thread,function
amplxe: Using result path `/home/peter/problem_report/tachyon/r000lw'
amplxe: Executing actions 50 % Generating a report                             Sync Object                                                                           Thread                        Function                                 Module                 Wait Time
------------------------------------------------------------------------------------  ----------------------------  ---------------------------------------  ---------------------  ---------
Mutex 0x2d974b21                                                                      tachyon_analyze (TID: 28772)  draw_task::operator()                    tachyon_analyze_locks     6.217s
Mutex 0x2d974b21                                                                      tachyon_analyze (TID: 28790)  draw_task::operator()                    tachyon_analyze_locks     6.030s
Mutex 0x2d974b21                                                                      tachyon_analyze (TID: 28791)  draw_task::operator()                    tachyon_analyze_locks     4.781s
Mutex 0x2d974b21                                                                      tachyon_analyze (TID: 28789)  draw_task::operator()                    tachyon_analyze_locks     4.212s
Condition Variable 0xeea6aa49                                                         tachyon_analyze (TID: 28790)  tbb::internal::rml::private_worker::run  libtbb.so.2               3.982s

 

 

0 Kudos
Reply