ABSTRACT
In this paper we present a static analysis tool called Iceberg that helps programmers find potential performance bugs in concurrent Java programs. The focus of our work is on identifying critical sections with high variability in their latency: in most cases they execute quickly, but occasionally they stall, holding a lock for an unusually long time, and preventing other threads from making progress. The end user experiences such behavior as transient program "hangs". These performance bugs are difficult to find because they are infrequent, transient, and hard to reproduce. This paper describes our initial results running Iceberg on 24 real-world concurrent programs. Our current approach is to identify all of the code that could be executed inside each critical section, including all methods potentially called by it. We collect a number of code metrics that might indicate potential performance problems. These metrics include counts of variable-latency operations such as I/O and memory allocation, as well as overall measurements of critical section size. Using our tool we are able to find critical sections with unusual behavior compared to the other critical sections. Our future work includes a more detailed analysis of control-flow through critical sections, as well as a dynamic analysis to measure the critical section latencies directly.
- Charlie Curtsinger and Emery D. Berger. 2015. Coz: finding code that counts with causal profiling. In Proceedings of the 25th Symposium on Operating Systems Principles (SOSP ’15). ACM, New York, NY, USA, 184-197. Google ScholarDigital Library
- Dacong Yan, Guoqing Xu, and Atanas Rountev. 2012. Rethinking Soot for summary-based whole-program analysis. In Proceedings of the ACM SIGPLAN International Workshop on State of the Art in Java Program analysis (SOAP ’12). ACM, New York, NY, USA, 9-14. Google ScholarDigital Library
- Dacong Yan, Guoqing Xu, and Atanas Rountev. 2012. Uncovering performance problems in Java applications with reference propagation profiling. In Proceedings of the 34th International Conference on Software Engineering (ICSE ’12). IEEE Press, Piscataway, NJ, USA, 134- 144. Google ScholarDigital Library
- Dmitrijs Zaparanuks and Matthias Hauswirth. 2012. Algorithmic profiling. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’12). ACM, New York, NY, USA, 67-76. Google ScholarDigital Library
- Florian David, Gael Thomas, Julia Lawall, and Gilles Muller. 2014. Continuously Measuring Critical Section Pressure with the Free-Lunch Profiler. SIGPLAN Not. 49, 10 (October 2014), 291-307. Google ScholarDigital Library
- GraphViz. http://www.graphviz.org/Google Scholar
- Guoliang Jin, Linhai Song, Xiaoming Shi, Joel Scherpelz, and Shan Lu. 2012. Understanding and detecting real-world performance bugs. SIGPLAN Not. 47, 6 (June 2012), 77-88. Google ScholarDigital Library
- Gustavo Pinto, Weslley Torres, Benito Fernandes, Fernando Castor, and Roberto S.M. Barros. 2015. A large-scale study on the usage of Java’s concurrent programming constructs. J. Syst. Softw. 106, C (August 2015), 59-81. Google ScholarDigital Library
- Raja Valle-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot - a Java bytecode optimization framework. In Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research (CASCON ’99), Stephen A. MacKay and J. Howard Johnson (Eds.). IBM Press 13-. Google ScholarDigital Library
- Rui Gu, Guoliang Jin, Linhai Song, Linjie Zhu, and Shan Lu. 2015. What change history tells us about thread synchronization. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). ACM, New York, NY, USA, 426-438. Google ScholarDigital Library
- Rui Xin, Zhengwei Qi, Shiqiu Huang, Chengcheng Xiang, Yudi Zheng, Yin Wang, and Haibing Guan. An automation-assisted empirical study on lock usage for concurrent programs. In 29th IEEE International Conference on Software Maintenance, 2013. Google ScholarDigital Library
- Sunflow - http://sunflow.sourceforge.net/Google Scholar
Index Terms
- Iceberg: a tool for static analysis of Java critical sections
Recommendations
Iceberg: dynamic analysis of Java synchronized methods for investigating runtime performance variability
ISSTA '18: Companion Proceedings for the ISSTA/ECOOP 2018 WorkshopsWriting multi-threaded code for both correctness and performance is difficult. Often programmers strive for correctness, which may lead to an overly conservative use of synchronization primitives. Even when correct, however, synchronized regions of code ...
Interprocedural strength reduction of critical sections in explicitly-parallel programs
PACT '13: Proceedings of the 22nd international conference on Parallel architectures and compilation techniquesIn this paper, we introduce novel compiler optimization techniques to reduce the number of operations performed in critical sections that occur in explicitly-parallel programs. Specifically, we focus on three code transformations: 1) Partial Strength ...
Lock elision for read-only critical sections in Java
PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and ImplementationIt is not uncommon in parallel workloads to encounter shared data structures with read-mostly access patterns, where operations that update data are infrequent and most operations are read-only. Typically, data consistency is guaranteed using mutual ...
Comments