ABSTRACT
Many large-scale Java applications suffer from runtime bloat. They execute large volumes of methods, and create many temporary objects, all to execute relatively simple operations. There are large opportunities for performance optimizations in these applications, but most are being missed by existing optimization and tooling technology. While JIT optimizations struggle for a few percent, performance experts analyze deployed applications and regularly find gains of 2x or more.
Finding such big gains is difficult, for both humans and compilers, because of the diffuse nature of runtime bloat. Time is spread thinly across calling contexts, making it difficult to judge how to improve performance. Bloat results from a pile-up of seemingly harmless decisions. Each adds temporary objects and method calls, and often copies values between those temporary objects. While data copies are not the entirety of bloat, we have observed that they are excellent indicators of regions of excessive activity. By optimizing copies, one is likely to remove the objects that carry copied values, and the method calls that allocate and populate them.
We introduce copy profiling, a technique that summarizes runtime activity in terms of chains of data copies. A flat copy profile counts copies by method. We show how flat profiles alone can be helpful. In many cases, diagnosing a problem requires data flow context. Tracking and making sense of raw copy chains does not scale, so we introduce a summarizing abstraction called the copy graph. We implement three clients analyses that, using the copy graph, expose common patterns of bloat, such as finding hot copy chains and discovering temporary data structures. We demonstrate, with examples from a large-scale commercial application and several benchmarks, that copy profiling can be used by a programmer to quickly find opportunities for large performance gains.
- G. Ammons, J.-D. Choi, M. Gupta, and N. Swamy. Finding and removing performance bottlenecks in large systems. In ECOOP, pages 172--196, 2004.Google Scholar
Cross Ref
- M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. A survey of adaptive optimization in virtual machines. Proc. IEEE, 92(2):449--466, 2005.Google Scholar
Cross Ref
- T. Ball and J. Larus. Efficient path profiling. In MICRO, pages 46--57, 1996. Google Scholar
Digital Library
- S. M. Blackburn and et al. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA, 2006. Google Scholar
Digital Library
- M. D. Bond and K. S. McKinley. Continuous path and edge profiling. In MICRO, pages 130--140, 2005. Google Scholar
Digital Library
- M. D. Bond, N. Nethercote, S. W. Kent, S. Z. Guyer, and K. S. McKinley. Tracking bad apples: reporting the origin of null and undefined value errors. In OOPSLA, pages 405--422, 2007. Google Scholar
Digital Library
- J. Clause, W. Li, and A. Orso. Dytan: A generic dynamic taint analysis framework. In ISSTA, pages 196--206, 2007. Google Scholar
Digital Library
- B. Dufour, K. Driesen, L. Hendren, and C. Verbrugge. Dynamic metrics for Java. In OOPSLA, pages 149--168, 2003. Google Scholar
Digital Library
- B. Dufour, B. G. Ryder, and G. Sevitsky. Blended analysis for performance understanding of framework-based applications. In ISSTA, pages 118--128, 2007. Google Scholar
Digital Library
- B. Dufour, B. G. Ryder, and G. Sevitsky. A scalable technique for characterizing the usage of temporaries in framework-intensive Java applications. In FSE, pages 59--70, 2008. Google Scholar
Digital Library
- ej-technologies. JProfiler. www.ej-technologies.com.Google Scholar
- Java Development Blog. dld.blog-city.com.Google Scholar
- Java Heap Analyzer Tool (HAT). hat.dev.java.net.Google Scholar
- J. Larus. Whole program paths. In PLDI, pages 259--269, 1999. Google Scholar
Digital Library
- W. Masri and A. Podgurski. An empirical study of the strength of information flows in programs. In WODA, pages 73--80, 2006. Google Scholar
Digital Library
- A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for Java. TOSEM, 14(1):1--41, 2005. Google Scholar
Digital Library
- N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. OOPSLA, pages 245--260, 2007. Google Scholar
Digital Library
- N. Mitchell, G. Sevitsky, and H. Srinivasan. Modeling runtime behavior in framework-based applications. In ECOOP, pages 429--451, 2006. Google Scholar
Digital Library
- N. Nethercote and J. Seward. How to shadow every byte of memory used by a program. In VEE, pages 65--74, 2007. Google Scholar
Digital Library
- J. Newsome and D. Song. Dynamic taint analysis for automatic detection, analysis, and signature generation of exploits on commodity software. In NDSS, 2005.Google Scholar
- F. Qin, C. Wang, Z. Li, H. Kim, Y. Zhou, and Y. Wu. Lift: A low-overhead practical information flow tracking system for detecting security attacks. In MICRO, pages 135--148, 2006. Google Scholar
Digital Library
- Quest Software. JProbe memory debugging. www.quest.com/jprobe.Google Scholar
- D. Rayside and L. Mendel. Object ownership profiling: a technique for finding and fixing memory leaks. In ASE, pages 194--203, 2007. Google Scholar
Digital Library
- A. Shankar, M. Arnold, and R. Bodik. JOLT: Lightweight dynamic analysis and removal of object churn. In OOPSLA, pages 127--142, 2008. Google Scholar
Digital Library
- O. Shivers. Control-flow analysis in Scheme. In PLDI, pages 164--174, 1988. Google Scholar
Digital Library
- K. Srinivas and H. Srinivasan. Summarizing application performance from a component perspective. In FSE, pages 136--145, 2005. Google Scholar
Digital Library
- Sun Java Forum. forums.java.net/jive/thread.jspa?messageID=180784.Google Scholar
- K. Vaswani, A. V. Nori, and T. M. Chilimbi. Preferential path profiling: Compactly numbering interesting paths. In POPL, pages 351--362, 2007. Google Scholar
Digital Library
- G. Xu and A. Rountev. Precise memory leak detection for Java software using container profiling. In ICSE, pages 151--160, 2008. Google Scholar
Digital Library
- W. Xu, S. Bhatkar, and R. Sekar. Taint-enhanced policy enforcement: a practical approach to defeat a wide range of attacks. In USENIX Security, pages 121--136, 2006. Google Scholar
Digital Library
- X. Zhang, N. Gupta, and R. Gupta. Pruning dynamic slices with confidence. In PLDI, pages 169--180, 2006. Google Scholar
Digital Library
- X. Zhang and R. Gupta. Cost effective dynamic program slicing. In PLDI, pages 94--106, 2004. Google Scholar
Digital Library
- X. Zhang and R. Gupta. Whole execution traces. In MICRO, pages 105--116, 2004. Google Scholar
Digital Library
- X. Zhang, R. Gupta, and Y. Zhang. Precise dynamic slicing algorithms. In ICSE, pages 319--329, 2003. Google Scholar
Digital Library
Index Terms
Go with the flow: profiling copies to find runtime bloat
Recommendations
Go with the flow: profiling copies to find runtime bloat
PLDI '09Many large-scale Java applications suffer from runtime bloat. They execute large volumes of methods, and create many temporary objects, all to execute relatively simple operations. There are large opportunities for performance optimizations in these ...
Object equivalence: revisiting object equality profiling (an experience report)
DLS '17Modern object-oriented programming languages greatly alleviate the memory management for programmers. Despite the efficiency of garbage collection and Just-In-Time program analyzes, memory still remains prone to be wasted.
A bloated memory may have ...
Efficient flow profiling for detecting performance bugs
ISSTA 2016: Proceedings of the 25th International Symposium on Software Testing and AnalysisPerformance issues in large applications arise only in particular scenarios under heavy load conditions. It is therefore difficult to catch them during testing and they easily escape into production. This necessitates the design of a common and ...







Comments