Abstract
Removing Unnecessary Synchronization in Java
by: Jeff Bogda and Urs Hï½lzle
Abstract:
Java programs perform many synchronization operations on data structures. Someof these synchronizations are unnecessary; in particular, if an object isreachable only by a single thread, concurrent access is impossible and nosynchronization is needed. We describe a flow-insensitive, context-sensitivedata-flow analysis that finds such situations and a global optimizingtransformation that eliminates synchronizations on these objects. For everyprogram in our suite of ten Java benchmarks consisting of SPECjvm98 and others,our system optimizes over 90% of the alias sets containing at least onesynchronized object. As a result, the dynamic frequency of synchronizations isreduced by up to 99%. For two benchmarks that perform synchronizations veryfrequently, this optimization leads to speedups of 36% and 20%, respectively.
Keywords:
synchronization, compiler optimization, Java, SPECjvm98, Hoelzle,Holzle
Date:
April 1999
Document: 1999-10