Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Aleksei_A_1
Beginner
51 Views

How to know who holds the lock in vtune

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
51 Views

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

locksandwaits.png

Aleksei_A_1
Beginner
51 Views

We'll try that, thanks a lot!

David_A_Intel1
Employee
51 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.)

Peter_W_Intel
Employee
51 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