Abstract:Aiming at the problem that improper locks in parallel programs may lead to performance bottlenecks, an approach called IdeSync was proposed to detect and optimize synchronization bottlenecks. IdeSync leveraged the static analysis to obtain the synchronized methods and blocks, and constructed a static synchronization dependency graph. The dynamic analysis technology based on the execution path was used to analyze the synchronization dependency and build the synchronization dependency graph.In order to expose the performance bottleneck, the performance change of the critical section was monitored by increasing the program workload on the synchronization dependency graph, and optimization suggestions were given for the detected synchronization bottleneck. The effectiveness of IdeSync was evaluated with 12 large real-world applications such as HSQLDB, SPECjbb2005 and RxJava, and a total of 72 synchronization bottlenecks were detected. All these bottlenecks were optimized based on IdeSync′s suggestion to achieve performance improvements, which shows that IdeSync can effectively detect and optimize synchronization bottlenecks.