Check out the new USENIX Web site. next up previous
Next: Monitor Contention Up: Comprehensive Profiling Support in Previous: Unnecessary Object Retention

Monitor Profiling

Monitors are the fundamental synchronization mechanism in the Java programming language. Programmers are generally concerned with two issues related to monitors: the performance impact of monitor contention and the cause of deadlocks. With the recent advances in monitor implementation [4] [21], non-contended monitor operations are no longer a performance issue. A non-contended monitor enter operation, for example, takes only 4 machine instructions on the x86 CPUs [21]. In properly tuned programs, vast majority of monitor operations are non-contended. For example, Table 1 shows the ratio of contended monitor operations in a number of programs. The first 8 applications are from the SPECjvm98 benchmark. The last two applications are GUI-rich programs. The monitor contention rate is extremely low in all programs. In fact, all but one program (mtrt) in the SPECjvm98 benchmark suite are single-threaded.


 
Table 1: Monitor Contention Rate of Benchmark Programs
program # non-contended # contended percent contended
compress 14627 0 0.00%
jess 4826524 0 0.00%
raytrace 377921 0 0.00%
db 53417611 0 0.00%
javac 17337221 0 0.00%
mpeg 14546 0 0.00%
mtrt 715233 11 0.002%
jack 11929729 0 0.00%
HotJava 2277113 564 0.02%
SwingSet 1587585 1332 0.08%
 



 
next up previous
Next: Monitor Contention Up: Comprehensive Profiling Support in Previous: Unnecessary Object Retention
Sheng Liang
1998-12-19