Monday, January 29, 2007

You are here

Ever wondered where you were on the net. This page has a red dot showing your location in Internet address space. The map, from supergeek cartoon xkcd uses a rather neat integer-to-space mapping, the Peano curve. I used this mapping to map addresses to positions for a video of memory activity for the talk associated with my ISMM paper. The paper was about optimistic stack allocation for Java-like languages and here is the video of memory activity. The pdf of the paper is subject to the following draconian ACM Copyright Policy: "© ACM, 2006. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in Proceedings of the 2006 international Symposium on Memory Management (Ottawa, Ontario, Canada, June 10 - 11, 2006). ISMM '06. ACM Press, New York, NY, 162-173. DOI=http://doi.acm.org/10.1145/1133956.1133978."

The movie perhaps needs a little explanation. It shows the execution of the 213.javac benchmark from the SpecJvm98 benchmark suite with the 10% data set. The rightmost column is the normal parameter/local variable Java stack (it's a single threaded benchmark). The next column is the allocation stack, where the system is stack allocating new objects. The next column is the semispace based first conventional GC generation. The large area is the main heap, which is so large that it is never garbage collected. Grey means unallocated, green means allocated and white means recently accessed. The idea of using the Peano curve to map addresses to screen coordinates is to make it easier to see locality of reference at both the cache line and page level. The stack allocation heuristic being used is "caller" (see the paper for details).

At any rate I find it quite hypnotic to watch. The main visible activity is the semi-space collector ploughing through memory, and switching halves at regular intervals. In fact a large amount of allocation and deallocation is also taking place on the allocation stack (this is the entire point) but it's not as visible since it's taking place in a very small amount of memory (which is also the entire point). The scale is such that the semispaces are each 64kbytes large if I recall correctly.

0 Comments:

Post a Comment

<< Home