This probe is fired only when the thread tries to enter a contended
monitor. In your example below, there's only one thread trying to
acquire the lock, so no contention occur.
Fred
Tigran Mkrtchyan wrote:
By reading manual, I have an impression that this probe is fired when a thread
enters a synchronized block, but in my simple example it did not.
<p>If this is not the right probe for it which one I have to use?
<p>Thanks,
Tigran.
<p>P.S: my test app
<pre>
import java.util.concurrent.TimeUnit;
import java.util.Vector;
public class a {
public static void main(String[] args) throws Exception {
Vector v = new Vector();
final Object lock = new Object();
for(int i = 0; i < 100000; i++) {
synchronized(lock) {
v.add(i);
}
try {
TimeUnit.SECONDS.sleep(2);
System.out.print(".");
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
System.out.println("\n");
}
}
</pre>
--
Frederic Parain - Sun Microsystems
180, av. de l'Europe, ZIRST de Montbonnot
38334 Saint Ismier, FRANCE
Phone: +33 4 76 18 81 17
Email: [email protected]
_______________________________________________
dtrace-discuss mailing list
[email protected]