arrow
Return

Refactoring Java Programs for Customizable Locks Based on Bytecode Transformation

delete2019-01-01
delete15
delete
OA
AI
张杨 cover
张杨 (Yang Zhang) *
S
Shuai Shao
H
Huan Liu
J
Jing Qiu *
D
Dongwen Zhang
G
Guanghua Zhang
DOI:10.1109/ACCESS.2019.2919203delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
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.
Keywords:
Software refactoring
synchronization
consistency
locks
program analysis
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

IEEE Access cover
IEEE Access
IF:
3.6
Papers:
9.8W
Citations:
29.4W

Organization

G
Guangzhou University
Scholars:
1.7W
Papers: 1.3W
Citations: 1.8W