[squeak-dev] re: The solution of

Igor Stasenko siguctua at gmail.com
Thu Aug 7 18:21:03 UTC 2008


2008/8/7 Craig Latta <craig at netjam.org>:
>
>> ...SystemTracer [doesn't give us a way to] truncate unwanted stuff
>> from the current image to produce a new, smaller one.
>
>     Yes, it does. It's called "clamping". See the class comment for
> SystemTracer. :)
>

I have a SystemTracer2, which comment reads:

Use it by subclassing it and overriding desired methods in:
	'object relacement' to create replacement objects for desired objects
(swapMap);
	'object encoding' to specify bit representation of objects;
	'clone startup' to initialize the new image on first startup.

... a bit further...

 swapMap	IdentityDictionary (oldObject -> newObject)
			When an object is visited, swapMap is checked to see if it has a
replacement, and if so the new object is traced and written instead of
the original.  You can add to the swapMap in initSwapMapPreShutdown or
initSwapMapPostShutdown before tracing starts, or you can add to it
during tracing in convert:pointer:field:.  The tracer automatically
adds itself and the active process to swapMap so it own execution
won't be traced (pvtWriteImageConverted).

---------

Maybe i was not precise (sorry for my bad English).
SystemTracer alone doesn't provide any sophisticated means how to
terminate a subgraph by replacing edges to something different,
neither any criteria upon which edges can be replaced/removed etc.
I mean, this is completely up to you - what objects will/can be placed
in swapMap.



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list