Steps to Modularity - Incremental Snapshots

Dan Ingalls DanI at wdi.disney.com
Fri Mar 26 07:17:09 UTC 1999


Folks -

A week or so ago, I sent out a message describing a technique for extracting segments from the Squeak image.  What I want to know is,

	Does anyone know of such a technique having being used previously?

I figure it must be known, but I have certainly never heard of it.  Please reply directly to me.

To recap, here's how it works:

	1.  Mark the root (or roots) of the subtree desired.

	2.  Do a GC mark pass.  SInce this stops at any marked objects,
	the subtree will be unmarked, "in the shadow" of its roots.

	3.  Copy the roots and the unmarked subtree into a byteArray (the image segment)
		Relocate internal pointers as you go
		Copy external pointers into a table of outpointers.

	Reinstalling a segment is incredibly simple -- all you do is remap any
		pointers in one pass and throw away the byteArray header!

Thanks
	- Dan

PS...
Ted and I have just completed an implementation and it is great.  (It will be out in updates and release 2.4 within a week).  It can trace and copy a 520kb tree of over 15000 objects in about 390ms.  Used for deepCopy, it is about 20 times faster than what we do currently.  Used to swap segments in and out, it finally offers a realistic vehicle for breaking down Squeak's monolithic images.

It's even faster than you would guess from the above.  There is a fixed overhead for the full GC mark and unmark.  This is 350ms on my machine (could surely be improved).  It can then copy out the 520kb segment or reinstall it in about 40ms either way.





More information about the Squeak-dev mailing list