Download Enhanced Heap Visualization with GCspy
Transcript
The GCspy framework 3 Chapter 2 The GCspy framework 2.1 Overview GCspy is an architectural framework for collection, transmission, storage and visualization of heap information. It is not specific to any particular application or runtime environment and can easily be adapted for use with any memory management system. [Printezis02] This chapter analyzes the architecture of GCspy and how the individual components communicate with it each other. It then goes on to illustrate how the layout of heaps is abstracted using general, non-specific data structures in GCspy. Finally, GCspy is compared to other tools for visualizing runtime heap information. 2.2 GCspy architecture GCspy is designed and implemented as a client-server architecture. The server component runs within the observed application or its virtual machine. The GCspy client connects to the server via a TCP/IP socket connection. Triggered by certain events such as a garbage collector run, the server sends a snapshot of the heap to the client. The client then interprets and visualizes the received data. It also maintains an index with a history of received snapshots to allow viewing the state of the heap at previous points in time. The GCspy framework provides the server infrastructure as libraries for C, C++ and Java. The client (also called visualizer) is a Java application with a Swing user interface. Developers only need to implement data collection in their memory management system and provide a driver that interprets and preprocesses the collected data for use with GCspy. Due to the representation of the heap layout in abstract structures, the client does not require any modifications for supporting new memory management systems.