Wednesday, May 16, 2001

I got the heap visualiser (I'm calling it GCspy for the moment -- can't think of a better name) connected to the VM yesterday and have managed to get the first visualisations. So I thought I'd share a few screenshots with you. They show the execution of the large Javac job with two 2MB semi-spaces in the young generation and 150MB of old generation, running the stop-the-world M&S (seemed to me a more exciting target for visualisation than the M&C -- still, I'll add facilities to also visualise the M&C + CM&S soon). Each tile represents an 128KB block in the heap.

Shot 1: Before Old GC (Used Space View)

This was taken before the first old GC. It was also taken while the visualiser was connected to the VM (notice the status field at the bottom-left of the window). What we see:

The Current Activity label (top-left of the window) shows that the state of the heap corresponds to the end of a young GC. Hence, the used semi-space is roughly 1/4 populated. Also, the old space is half-way through being full -- since there hasn't been an old GC yet all free space is contiguous and hence linearly allocated.

Shot 2: After Old GC (Used Space View)

This was taken sometime after the first old GC. The visualiser has been disconnected from the VM (look at the status field at the bottom-left), but I can still click on things and change the views -- the visualiser shows the last state transmitted to it. irst, thing we notice is that the Current Activity field indicates that this is the start of a young GC; hence the active semi-space is full. Notice, however, the state of the old generation: objects have been de-allocated in-place in it and free space is scattered around the generation (indicated by the different shades of red that apprear all over).

Shot 3: After Old GC (Free Chunks View)

Same state as above, but now I'm visualising the number of non-contiguous free chunks in each tile, instead of the amount of used up space. In this case, bright blue means there 100+ free chunks in the tile, black means there are 0 free chunks in the tile, and an in-between shade means there are from 1 to 100 free chunks in the tile. The way we change the view is by using the View menu (center-left). We can also change the view live, while the visualiser is connected.

Another thing to notice at this point is that there is still a selected tile in the old generation which is also shown magnified and centered (with a few more tiles around it) at the Magnification area (bottom-left). There is also a smaller version of it that can show a number of (small) tiles contiguously that might not be contiguous on the main area (as it is the case in the illustrated example).

Shot 4: After Old GC (Card Table View)

Again, same state as above, but now the card table is being visualised. The colors mean the following:

Shot 5: After Old GC (Young Space Selected)

Again, same state as above, but I have shifted focus to the young generation space (I "activated" that space) which has now "taken over" the controls on the left (Block Info text area, View menu, and Magnification area). You can spot that the contents of the Block Info text area has different information than before because the young generation doesn't need to track of number of free chunks or the state of the cards.


GCspy is developed and maintained by Tony Printezis.
The main GCspy page is here.
If you have any comments, feedback, suggestions, etc. please feel free to e-mail me.