DocumentCode :
555272
Title :
Refactoring Java programs for flexible locking
Author :
Schäfer, Max ; Sridharan, Manu ; Dolby, Julian ; Tip, Frank
Author_Institution :
Oxford Univ. Comput. Lab., Oxford, UK
fYear :
2011
fDate :
21-28 May 2011
Firstpage :
71
Lastpage :
80
Abstract :
Recent versions of the Java standard library offer flexible locking constructs that go beyond the language´s built-in monitor locks in terms of features, and that can be fine-tuned to suit specific application scenarios. Under certain conditions, the use of these constructs can improve performance significantly, by reducing lock contention. However, the code transformations needed to convert between locking constructs are non-trivial, and great care must be taken to update lock usage throughout the program consistently. We present Relocker, an automated tool that assists programmers with refactoring synchronized blocks into ReentrantLocks and ReadWriteLocks, to make exploring the performance tradeoffs among these constructs easier. In experiments on a collection of real-world Java applications, Relocker was able to refactor over 80% of built-in monitors into ReentrantLocks. Additionally, in most cases the tool could automatically infer the same ReadWriteLock usage that programmers had previously introduced manually.
Keywords :
Java; program diagnostics; software maintenance; Java program refactoring; Java standard library; ReadWriteLocks; ReentrantLocks; code transformations; flexible locking; language built-in monitor locks; relocker; synchronized block refactoration; Benchmark testing; Java; Monitoring; Sun; Switches; Synchronization; Throughput; monitors; read-write locks; refactoring;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering (ICSE), 2011 33rd International Conference on
Conference_Location :
Honolulu, HI
ISSN :
0270-5257
Print_ISBN :
978-1-4503-0445-0
Electronic_ISBN :
0270-5257
Type :
conf
DOI :
10.1145/1985793.1985804
Filename :
6032446
Link To Document :
بازگشت