The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.06 - June (2013 vol.39)
pp: 774-786
M. Marron , Fac. Inf., Imdea Software Inst., Madrid, Spain
C. Sanchez , Fac. Inf., Imdea Software Inst., Madrid, Spain
Zhendong Su , Dept. of Comput. Sci., Univ. of California Davis, Davis, CA, USA
M. Fahndrich , Microsoft Res., Redmond, WA, USA
ABSTRACT
Modern programming environments provide extensive support for inspecting, analyzing, and testing programs based on the algorithmic structure of a program. Unfortunately, support for inspecting and understanding runtime data structures during execution is typically much more limited. This paper provides a general purpose technique for abstracting and summarizing entire runtime heaps. We describe the abstract heap model and the associated algorithms for transforming a concrete heap dump into the corresponding abstract model as well as algorithms for merging, comparing, and computing changes between abstract models. The abstract model is designed to emphasize high-level concepts about heap-based data structures, such as shape and size, as well as relationships between heap structures, such as sharing and connectivity. We demonstrate the utility and computational tractability of the abstract heap model by building a memory profiler. We use this tool to identify, pinpoint, and correct sources of memory bloat for programs from DaCapo.
INDEX TERMS
Abstracts, Concrete, Shape, Runtime, Arrays, Computational modeling,program understanding, Heap structure, runtime analysis, memory profiling
CITATION
M. Marron, C. Sanchez, Zhendong Su, M. Fahndrich, "Abstracting runtime heaps for program understanding", IEEE Transactions on Software Engineering, vol.39, no. 6, pp. 774-786, June 2013, doi:10.1109/TSE.2012.69
REFERENCES
[1] P. Cousot and R. Cousot, "Systematic Design of Program Analysis Frameworks," Proc. Sixth ACM SIGACT-SIGPLAN Symp. Principles of Programming Languages, 1979.
[2] F. Nielson, H. Nielson, and C. Hankin, Principles of Program Analysis. Springer-Verlag, 1999.
[3] D. Chase, M. Wegman, and K. Zadeck, "Analysis of Pointers and Structures," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, 1990.
[4] R. Ghiya and L. Hendren, "Is It a Tree a Dag or a Cyclic Graph? A Shape Analysis for Heap-Directed Pointers in C," Proc. 23rd ACM SIGACT-SIGPLAN Symp. Principles of Programming Languages, 1996.
[5] M. Marron, M. Méndez-Lojo, M. Hermenegildo, D. Stefanovic, and D. Kapur, "Sharing Analysis of Arrays, Collections, and Recursive Structures," Proc. Eighth ACM SIGPLAN-SIGSOFT Workshop Program Analysis for Software Tools and Eng., 2008.
[6] R. DeLine and K. Rowan, "Code Canvas: Zooming towards Better Development Environments," Proc. 32nd ACM/IEEE Int'l Conf. Software Eng., 2010.
[7] E. Barr, C. Bird, and M. Marron, "Collecting a Heap of Shapes," Technical Report MSR-TR-2011-135, Microsoft Research, Dec. 2011.
[8] J. Caballero, G. Grieco, M. Marron, Z. Lin, and D. Urbina, "ARTISTE: Automatic Generation of Hybrid Data Structure Signatures from Binary Code Executions," IMDEA Software Inst., Technical Report TR-IMDEA-SW-2012-001, http://software. imdea.org/juanca/papers artiste-TR.pdf, Aug. 2012.
[9] J. Berdine, C. Calcagno, B. Cook, D. Distefano, P. O'Hearn, T. Wies, and H. Yang, "Shape Analysis for Composite Data Structures," Proc. 19th Int'l Conf. Computer Aided Verification, 2007.
[10] M. Jump and K. McKinley, "Dynamic Shape Analysis via Degree Metrics," Proc. Int'l Symp. Memory Management, 2009.
[11] A. Deutsch, "Interprocedural May-Alias Analysis for Pointers: Beyond k-Limiting," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, 1994.
[12] M. Marron, D. Kapur, and M. Hermenegildo, "Identification of Logically Related Heap Regions," Proc. Int'l Symp. Memory Management, 2009.
[13] "DGML Specification," http://schemas.microsoft.com/vs/2009dgml , 2012.
[14] S. Muchnick, Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997.
[15] D. Clarke, J. Potter, and J. Noble, "Ownership Types for Flexible Alias Protection," Proc. 13th ACM SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications, 1998.
[16] N. Mitchell, E. Schonberg, and G. Sevitsky, "Making Sense of Large Heaps," Proc. 23rd European Conf. Object-Oriented Programming, 2009.
[17] N. Mitchell, "The Runtime Structure of Object Ownership," Proc. 20th European Conf. Object-Oriented Programming, 2006.
[18] "Common Compiler Infrastructure," http:/ccimetadata. codeplex.com, 2012.
[19] N. Mitchell and G. Sevitsky, "The Causes of Bloat, the Limits of Health," Proc. ACM 22nd Ann. SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications, 2007.
[20] M. Marron, D. Stefanovic, M. Hermenegildo, and D. Kapur, "Heap Analysis in the Presence of Collection Libraries," Proc. Seventh ACM SIGPLAN-SIGSOFT Workshop Program Analysis for Software Tools and Eng., 2007.
[21] I. Dillig, T. Dillig, and A. Aiken, "Precise Reasoning for Programs Using Containers," Proc. 38th ACM Ann. SIGACT-SIGPLAN Symp. Principles of Programming Languages, 2011.
[22] "Standard Performance Evaluation Corporation. JVM98 Version 1.04," http://www.spec.orgjvm98, Aug. 1998.
[23] S. Blackburn, R. Garner, C. Hoffman, A. Khan, K. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann, "The DaCapo Benchmarks: Java Benchmarking Development and Analysis (2006-mr2)," Proc. 21st ACM Ann. SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications, 2006.
[24] "ikvm," http:/www.ikvm.net/, 2012.
[25] M. Jump and K. McKinley, "Cork: Dynamic Memory Leak Detection for Garbage-Collected Languages," Proc. 34th ACM Ann. SIGACT-SIGPLAN Symp. Principles of Programming Languages, 2007.
[26] T. Zimmermann and A. Zeller, "Visualizing Memory Graphs," Proc. Int'l Seminar Revised Lectures Software Visualization, 2001.
[27] S. Pheng and C. Verbrugge, "Dynamic Data Structure Analysis for Java Programs," Proc. 14th IEEE Int'l Conf. Program Comprehension, 2006.
[28] A. Zeller, "Isolating Cause-Effect Chains from Computer Programs," Proc. 10th ACM SIGSOFT Symp. Foundations of Software Eng., 2002.
[29] B. Liblit, M. Naik, A. Zheng, A. Aiken, and M. Jordan, "Scalable Statistical Bug Isolation," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, 2005.
[30] C. Liu, X. Yan, L. Fei, J. Han, and S. Midkiff, "Sober: Statistical Model-Based Bug Localization," SIGSOFT, vol. 30, no. 5, pp. 2860-295, 2005.
[31] A. Potanin, J. Noble, and R. Biddle, "Snapshot Query-Based Debugging," Proc. Australian Software Eng. Conf., 2004.
[32] T. Hill, J. Noble, and J. Potter, "Scalable Visualizations of Object-Oriented Systems with Ownership Trees," J. Visual Languages and Computing, vol. 13, pp. 319-339, 2002.
[33] W.D. Pauw and G. Sevitsky, "Visualizing Reference Patterns for Solving Memory Leaks in Java," Proc. 13th European Conf. Object-Oriented Programming, 1999.
[34] E. Aftandilian, S. Kelley, C. Gramazio, N. Ricci, S. Su, and S. Guyer, "Heapviz: Interactive Heap Visualization for Program Understanding and Debugging," Proc. Fifth Int'l Symp. Software Visualization, 2010.
[35] C. Lattner, A. Lenharth, and V.S. Adve, "Making Context-Sensitive Points-To Analysis with Heap Cloning Practical for the Real World," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, 2007.
[36] S. Sagiv, T. Reps, and R. Wilhelm, "Parametric Shape Analysis via 3-Valued Logic," Proc. 26th ACM SIGACT-SIGPLAN Symp. Principles of Programming Languages, 1999.
[37] M. Polishchuk, B. Liblit, and C. Schulze, "Dynamic Heap Type Inference for Program Understanding and Debugging," Proc. 34th ACM SIGACT-SIGPLAN Symp. Principles of Programming Languages, 2007.
35 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool