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 does not 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 implement a powerful visualization component whose interactive interface provides extensive support for exploring the graph. The user can search for objects based on type, connectivity, and field values; group objects; and color or hide and show each group. The user may also inspect individual objects to see their field values and neighbors in the graph. These interactive abilities help the user manage the complexity of these huge graphs. By applying Heapviz to both constructed and real-world examples, we show that it 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]  Martin C. Rinard,et al.  Automatic Extraction of Heap Reference Properties in Object-Oriented Programs , 2009, IEEE Transactions on Software Engineering.

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

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

[5]  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.

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

[7]  HelmRichard,et al.  Visualizing the behavior of object-oriented systems , 1993 .

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

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

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

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

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

[13]  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.

[14]  Sara L. Su,et al.  Heapviz: interactive heap visualization for program understanding and debugging , 2010, SOFTVIS '10.

[15]  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.

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

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

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

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

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

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

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

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