Holding time of a thread on a lock

Holding time of a thread on a lock

 1.How do i get holding time of a thread on a lock?

I have a sync function. i want to caculate the execution time or holding time on that function. Is it equal to the spin time?

2. I am profiling a java web application on tomcat. But vTune fails to map the java function or lock exactly. Always it shows the libpthread like function. How to correctly profile a java application?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

1. Use Locksandwaits collection to know time spent in sync objectives. Meanwhile, you can know if locked, other threads are working or not (program stalls?). It's hard to say it is spin-lock or "light-lock" - it depends on what lock you used. 

2. The tool can profile Java classes. If doesn't work if you profile tomcat which calls Java process. However, lastest product XE 2013 Update 5 supports "Attaching Java process" feature, you can try.

Leave a Comment

Please sign in to add a comment. Not a member? Join today