[Vm-dev] A update to SystemTracer for getting back to 32 bits
David T. Lewis
lewis at mail.msen.com
Mon Jan 12 00:47:14 UTC 2015
I have been using a 64-bit (format 68002) image as my working Squeak image
for a few months now, so I became interested in the question of whether
that image could be converted back to a 32-bit image that could be run again
on Cog and on future Spur VMs. To my surprise, this turned out to be quite
easy to do.
>From the class comment from the original SystemTracer:
The SystemTracer was invented by Ted Kaehler. It has gone through many
variations. I have simplified it and adapted it to work with Squeak's
limited Object hashing. It has written runnable Mac images on a Mac.
Some changes may be needed for it to produce runnable images on a
bigEndian machine. -- Dan I. 9/29/97
The current archive is at http://www.squeaksource.com/SystemTracing
One variation of this is SystemTracer64, which is used for converting
("tracing") a standard 32-bit image into a 64-bit image format (identified
as image format 68002). An up to date trace of the Squeak image is
maintained at http://build.squeak.org/job/Squeak%2064-bit%20image/,
and a Linux VM is at
This 64-bit image (format 68002) is a straightforward extension of the
standard 32-bit image formats currently used for Squeak and Pharo (image
format 6504 or 6505). Details are in the class comment for ObjectMemory,
which now resides in package VMMaker on source.squeak.org. It provides
essentially unlimited object memory space, with minimal change to the
internal representation of the objects in that object memory. This is
not to be confused with the 64-bit Spur object memory, which provides
substantial performance improvements based on an improved (and different)
object memory design.
I made a minor update to the SystemTracer that allows it to convert a 64-bit
image back to 32-bit format, and it worked perfectly with my working Squeak
image that has been in 64-bit format for several months now.
>From the update comment:
Time: 2 January 2015, 1:21:45.031 pm
Update SystemTracer2 to support tracing a 64-bit image format 68002 image
back to 32-bit image format 6504. This makes conversion to 64-bit format
a reversible process.
To trace an existing 32-bit (format 6504 or 6505) image to 64-bit format:
SystemTracer64 writeImage: 'clone64.image'
To trace an 64-bit (format 68002) image to 32-bit format:
SystemTracer2 writeImage: 'clone32.image'
The resulting 32-bit image must be opened first using an interpreter VM,
after which it can be run normally with a Cog VM. Tracing should be done
using an interpreter VM.
More information about the Vm-dev