Removing unnecessary synchronization in Java
Jeff Bogda, Urs Hölzle · ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) · 1999
Java programs perform many synchronization operations on data structures. Some of these synchronization are unnecessary; in particular, if an object is reachable only by a single thread, concurrent access is impossible and no synchronization is needed. We describe an interprocedural, flow- and context-insensitive dataflow analysis that finds such situations. A global optimizing transformation then eliminates synchronizations on these objects. For every program in our suite of ten Java benchmarks consisting of SPECjvm98 and others, our system optimizes over 90% of the alias sets containing at least one synchronized object. As a result, the dynamic frequency of synchronizations is reduced by up to 99%. For two benchmarks that perform synchronizations very frequently, this optimization leads to speedups of 36% and 20%.
Cited by 210 works. doi:10.1145/320384.320388
Authors
References
- The Java Language Specification
- Java Virtual Machine Specification
- Efficient context-sensitive pointer analysis for C programs
- Efficient context-sensitive pointer analysis for C programs
- Lifetime analysis of dynamically allocated objects
- Escape analysis for Java
- Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C
- Thin locks
- Marmot: an optimizing compiler for Java
- Harissa: a flexible and efficient java environment mixing bytecode and compiled code