[Vm-dev] [ANN] ImageWriter, the SystemTracer's son
guillermopolito at gmail.com
Thu Apr 26 11:00:23 UTC 2012
First public push of the first step of the hazelnut GSoC project :)
*In a nutshell*
For those who didn't know SystemTracer (the father):
It is a tool that traces a graph of objects and writes an image from it.
ImageWriter is a refactored, renamed and repackaged version of
SystemTracer2 with the following changes:
- The image format can be provided as a parameter.
- You have to provide an SmalltalkImage object as root to write the image
(so in the future we can write bootstrap with this).
- The object format was reified in objects. So the code is easier to
understand + change, and people can learn how are our objects in memory
Right now, only 32 bit image format is supported.
- ImageWriter-Core has the image formats and the image writer in itself
- ImageWriter-ObjectFormats contains objects that represent the memory
layout of the objects and it's headers.
- ImageWriter-Tests has some tests.
- Only tested in Pharo-1.4
- There are specific tests written for the size and headers of the objects
- Also, I've written a Pharo-1.4 image and then run the tests in the
copied image. Only one failure compared to the original :)
*Known Bugs :)*
- WeakRegistryTest>>#testFinalizationWithOnFork is failing, and when I run
it manually it works :/. In the image I use to write, it does not happen,
only in the clone.
- When opening the new image, the window is too small. It is not
respecting the original image size. Don't know yet what is the problem.
*How To Download*
*How to Use it*
format: HzCogImageFormat new; "or HzInterpreterImageFormat new"
onInitializeDo: [ "Some initialization?" ]; "this is optional,
probably the same as an startup script, probably nonsense"
writeImage: Smalltalk "Yes, we provide the our lovely global Smalltak,
but any SmalltalkImage instance could be"
*Next steps on this direction*
- support to write an isolated image different from the host one (I'll
know what I need later, hehe)
- class comments!
- metacello configuration
- better api :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev