期刊名称:International Journal of Grid and Distributed Computing
印刷版ISSN:2005-4262
出版年度:2016
卷号:9
期号:6
页码:71-82
DOI:10.14257/ijgdc.2016.9.6.08
出版社:SERSC
摘要:Multi-threaded Java applications using synchronized or reentrant locks respectively exist performance trade-off. Parallel programmers usually use manual refactoring to test the performance of locks in a particular environment. However, manual refactoring is labor-intensive and error-prone. There is a strong need for automated support to find which one is more suitable to exert the performance of applications. This paper presents a refactoring framework to enable the transformation from synchronized locks to reentrant locks automatically. The framework analyzes global monitors based on Quad intermediate representation and visitor pattern in the Joeq compiler, validates the consistency of analysis results, and performs the transformation. The framework is evaluated on three benchmarks including red-black tree, producer-consumer problem, and SPECjbb2005. The total time is less than 4s for all three benchmarks on common desktop computer, and the successful refactoring results are observed.