[squeak-dev] SystemTracing updated on SqueakMap

David T. Lewis lewis at mail.msen.com
Sun Dec 2 16:54:58 UTC 2012


I updated the SqueakMap entry for SystemTracing with a new release for
Squeak 4.4. This is the latest version that is being used to trace 64-bit
images on http://box3.squeak.org/job/Squeak%2064-bit%20image/

The script that is being used for the 64-bit image trace is
http://box3.squeak.org/job/Squeak%2064-bit%20image/ws/TraceTo64.st
and copied below for reference.

Dave

--- cut here ---

"TraceTo64.st - trace a 32-bit image to 64-bit object format"
"7 November 2012 dtl"

"Use a local copy of a Monticello source file for SystemTracer obtained
from the repository at http://www.squeaksource.com/SystemTracing"
systemTracerSource := 'SystemTracing-dtl.24.mcz'.

"Do everything in a temporary change set. This allows the change records
to be removed from the traced image after tracing is complete."
thisChangeSet := ChangeSet current.
workingChangeSet := ChangeSet basicNewChangeSet: 'SystemTracing-tmp'.
ChangeSet newChanges: workingChangeSet.

"Load system tracer. File the package in from a stream on the source contents
in order minimize changes to this image."
fs := FileStream oldFileNamed: systemTracerSource.
[zip := ZipArchive new readFrom: fs.
srcMember := zip members detect: [:e | e fileName = 'snapshot/source.st' ].
src := ReadStream on: srcMember contents.
src fileIn
] ensure: [fs close].

"Trace the image"
newImageName := (Smalltalk imageName copyUpToLast: $.), '-64.image'.
(Smalltalk at: #SystemTracer64)
	perform: #writeImage:interactive:
	with: newImageName
	with: false.

"Execution resumes here in the newly traced image"
Smalltalk wordSize = 8
	ifFalse: ["If word size is 4, we are in the original image, so quit now"
			Smalltalk snapshot: false andQuit: true]
	ifTrue: ["If word size 8, this is the new 64-bit image, so continue"]. 

"Remove system tracer from the image"
SystemOrganization removeSystemCategory: 'SystemTracing'.

"Return to the original change set"
ChangeSet newChanges: thisChangeSet.

"Remove the working change set, returning the image to its original state"
ChangeSet removeChangeSet: workingChangeSet.

"Clean up some garbage"
systemTracerSource := thisChangeSet := workingChangeSet := nil.
fs := src := newImageName := nil.
Smalltalk garbageCollect.



More information about the Squeak-dev mailing list