Title
Refactoring Java Programs for Customizable Locks Based on Bytecode Transformation.
Abstract
Developers of parallel programming are faced with choices of using various Java locks. Choosing the best lock is a challenging task because a multithreaded application implemented using different locks may end up with uncertain performance. There is a strong need for automated tool support that helps Java programmers choose the best lock for each specific application. This paper presents an automated transformation approach to convert an implementation using a synchronized lock to a ReentrantLock or a ReentrantReadWriteLock at the bytecode level. For the ReentrantLock, our approach runs analysis for global monitors using the visitor pattern in the Joeq compiler. For the ReentrantReadWriteLock, a read or write lock is chosen after a side-effect analysis. Then, the proposed system validates the consistency of the analysis results to ensure a correct sequence of lock usage. Finally, lock operations and related thread communication operations are transformed into a ReentrantLock or a ReentrantReadWriteLock using a bytecode transformation framework Javassist. We validate our approach on several benchmarks including RBTree, PC, SPECjbb2005, and HSQLDB. The experimental results show that the proposed automated transformation approach can transform these benchmarks successfully in a timely fashion.
Year
DOI
Venue
2019
10.1109/ACCESS.2019.2919203
IEEE ACCESS
Keywords
Field
DocType
Software refactoring,synchronization,consistency,locks,program analysis
Programming language,Computer science,Lock (computer science),Compiler,Thread (computing),Record locking,Bytecode,Visitor pattern,Java,Code refactoring,Distributed computing
Journal
Volume
ISSN
Citations 
7
2169-3536
0
PageRank 
References 
Authors
0.34
0
6
Name
Order
Citations
PageRank
Yang Zhang172.33
Shuai Shao200.34
huan liu33623.08
Jing Qiu46014.01
Dong-Wen Zhang5236.24
Guanghua Zhang611.39