Heapviz: interactive heap visualization for program understanding and debugging

Understanding the data structures in a program is crucial to understanding how the program works, or why it doesn't work. Inspecting the code that implements the data structures, however, is an arduous task and often fails to yield insights into the global organization of a program's data. Inspecting the actual contents of the heap solves these problems but presents a significant challenge of its own: finding an effective way to present the enormous number of objects it contains. In this paper we present Heapviz, a tool for visualizing and exploring snapshots of the heap obtained from a running Java program. Unlike existing tools, such as traditional debuggers, Heapviz presents a global view of the program state as a graph, together with powerful interactive capabilities for navigating it. Our tool employs several key techniques that help manage the scale of the data. First, we reduce the size and complexity of the graph by using algorithms inspired by static shape analysis to aggregate the nodes that make up a data structure. Second, we introduce a dominator-based layout scheme that emphasizes hierarchical containment and ownership relations. Finally, the interactive interface allows the user to expand and contract regions of the heap to modulate data structure detail, inspect individual objects and field values, and search for objects based on type or connectivity. By applying Heapviz to both constructed and real-world examples, we show that Heapviz provides programmers with a powerful and intuitive tool for exploring program behavior.

[1]  Godmar Back,et al.  HDPV: interactive, faithful, in-vivo runtime state visualization for C/C++ and Java , 2008, SOFTVIS.

[2]  Hausi A. Müller,et al.  Manipulating and documenting software structures using SHriMP views , 1995, Proceedings of International Conference on Software Maintenance.

[3]  Doug Kimelman,et al.  Visualizing the behavior of object-oriented systems , 1993, OOPSLA '93.

[4]  Steven P. Reiss,et al.  Visualizing the Java heap to detect memory problems , 2009, 2009 5th IEEE International Workshop on Visualizing Software for Understanding and Analysis.

[5]  M. Chial,et al.  in simple , 2003 .

[6]  Clark Verbrugge,et al.  Dynamic Data Structure Analysis for Java Programs , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[7]  Neil Immerman,et al.  What can the GC compute efficiently?: a language for heap assertions at GC time , 2010, SPLASH 2010.

[8]  Derek Rayside,et al.  A dynamic analysis for revealing object ownership and sharing , 2006, WODA '06.

[9]  Steven P. Reiss,et al.  Jove: java as it happens , 2005, SoftVis '05.

[10]  Nick Mitchell,et al.  The Runtime Structure of Object Ownership , 2006, ECOOP.

[11]  Timothy J. Harvey,et al.  AS imple, Fast Dominance Algorithm , 1999 .

[12]  Martin C. Rinard,et al.  Automatic Extraction of Heap Reference Properties in Object-Oriented Programs , 2009, IEEE Transactions on Software Engineering.

[13]  Edith Schonberg,et al.  Making Sense of Large Heaps , 2009, ECOOP.

[14]  James Noble,et al.  Scalable Visualizations of Object-Oriented Systems with Ownership Trees , 2002, J. Vis. Lang. Comput..

[15]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 1999, POPL '99.

[16]  Jr. Frederick P. Brooks,et al.  The Mythical Man-Month: Essays on Softw , 1978 .

[17]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[18]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[19]  Wim De Pauw,et al.  Visualizing Object-Oriented Programs with Jinsight , 1998, ECOOP Workshops.

[20]  Stanley B. Zdonik,et al.  A*-tree , 2010, Proc. VLDB Endow..

[21]  Fred P. Brooks,et al.  The Mythical Man-Month , 1975, Reliable Software.

[22]  Gary Sevitsky,et al.  Visualizing reference patterns for solving memory leaks in Java , 1999, Concurr. Pract. Exp..

[23]  Ravi B. Konuru,et al.  An information exploration tool for performance analysis of Java programs , 2001, Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 38.

[24]  Shirley Dex,et al.  JR 旅客販売総合システム(マルス)における運用及び管理について , 1991 .

[25]  Ken Kennedy,et al.  AS imple, Fast Dominance Algorithm , 1999 .

[26]  Zhendong Su,et al.  High-Level Heap Abstractions for Debugging Programs , 2010 .

[27]  Ali S. Erkan,et al.  Data structure visualization with latex and prefuse , 2007 .

[28]  Laurie J. Hendren,et al.  Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C , 1996, POPL '96.

[29]  Andreas Zeller,et al.  Visualizing Memory Graphs , 2001, Software Visualization.

[30]  Rainer Koschke,et al.  The Dominance Tree in Visualizing Software Dependencies , 2005, 3rd IEEE International Workshop on Visualizing Software for Understanding and Analysis.

[31]  Jeffrey Heer,et al.  prefuse: a toolkit for interactive information visualization , 2005, CHI.