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 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

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.

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi