[Vm-dev] VM Maker: Cog-eem.121.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Nov 19 21:32:11 UTC 2013


Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.121.mcz

==================== Summary ====================

Name: Cog-eem.121
Author: eem
Time: 19 November 2013, 1:31:54.036 pm
UUID: 3f9a0428-8f85-45e3-a596-5e37f70eb880
Ancestors: Cog-eem.120

Allow one to specify the snapshotted transformed image's name.

=============== Diff against Cog-eem.120 ===============

Item was changed:
  ----- Method: SpurBootstrap>>writeSnapshotOfTransformedImage (in category 'testing') -----
  writeSnapshotOfTransformedImage
+ 	self writeSnapshotOfTransformedImageAs: 'spur.image'!
- 	"The bootstrapped image typically contains a few big free chunks and one huge free chunk.
- 	 Test snapshot writing and loading by turning the largest non-huge chunks into segment bridges
- 	 and saving."
- 	| penultimate ultimate heap sizes counts barriers sim |
- 	heap := TransformedImage veryDeepCopy.
- 	sim := StackInterpreterSimulator onObjectMemory: heap.
- 	sim bootstrapping: true.
- 	heap coInterpreter: sim.
- 	sim initializeInterpreter: 0;
- 		setImageHeaderFlagsFrom: ImageHeaderFlags;
- 		setDisplayForm: (Form extent: ImageScreenSize >> 16 @ (ImageScreenSize bitAnd: 16rFFFF)).
- 	heap allOldSpaceEntitiesDo: [:e| penultimate := ultimate. ultimate := e].
- 	self assert: (heap isFreeObject: penultimate).
- 	self assert: (heap isSegmentBridge: ultimate).
- 	sizes := Bag new.
- 	heap allObjectsInFreeTree: (heap freeLists at: 0) do:
- 		[:f|
- 		sizes add: (heap bytesInObject: f)].
- 	counts := sizes sortedCounts.
- 	self assert: counts last key = 1. "1 huge chunk"
- 	self assert: ((counts at: counts size - 1) key > 2
- 				and: [(counts at: counts size - 1) value > 1024]).
- 	barriers := (1 to: (counts at: counts size - 1) key) collect:
- 					[:ign| heap allocateOldSpaceChunkOfExactlyBytes: (counts at: counts size - 1) value].
- 	barriers := barriers, {heap allocateOldSpaceChunkOfExactlyBytes: (heap bytesInObject: penultimate)}.
- 	heap setEndOfMemory: barriers last.
- 	heap allOldSpaceEntitiesDo: [:e| penultimate := ultimate. ultimate := e].
- 	self assert: (heap addressAfter: ultimate) = barriers last.
- 	heap checkFreeSpace.
- 	heap runLeakCheckerForFullGC: true.
- 	heap segmentManager initializeFromFreeChunks: (barriers sort collect: [:b| heap objectStartingAt: b]).
- 	heap checkFreeSpace.
- 	heap runLeakCheckerForFullGC: true.
- 	sim bereaveAndNormalizeContextsAndFlushExternalPrimitives.
- 	sim imageName: 'spur.image'.
- 	sim writeImageFileIO!

Item was added:
+ ----- Method: SpurBootstrap>>writeSnapshotOfTransformedImageAs: (in category 'testing') -----
+ writeSnapshotOfTransformedImageAs: imageFileName
+ 	"The bootstrapped image typically contains a few big free chunks and one huge free chunk.
+ 	 Test snapshot writing and loading by turning the largest non-huge chunks into segment bridges
+ 	 and saving."
+ 	| penultimate ultimate heap sizes counts barriers sim |
+ 	heap := TransformedImage veryDeepCopy.
+ 	sim := StackInterpreterSimulator onObjectMemory: heap.
+ 	sim bootstrapping: true.
+ 	heap coInterpreter: sim.
+ 	sim initializeInterpreter: 0;
+ 		setImageHeaderFlagsFrom: ImageHeaderFlags;
+ 		setDisplayForm: (Form extent: ImageScreenSize >> 16 @ (ImageScreenSize bitAnd: 16rFFFF)).
+ 	heap allOldSpaceEntitiesDo: [:e| penultimate := ultimate. ultimate := e].
+ 	self assert: (heap isFreeObject: penultimate).
+ 	self assert: (heap isSegmentBridge: ultimate).
+ 	sizes := Bag new.
+ 	heap allObjectsInFreeTree: (heap freeLists at: 0) do:
+ 		[:f|
+ 		sizes add: (heap bytesInObject: f)].
+ 	counts := sizes sortedCounts.
+ 	self assert: counts last key = 1. "1 huge chunk"
+ 	self assert: ((counts at: counts size - 1) key > 2
+ 				and: [(counts at: counts size - 1) value > 1024]).
+ 	barriers := (1 to: (counts at: counts size - 1) key) collect:
+ 					[:ign| heap allocateOldSpaceChunkOfExactlyBytes: (counts at: counts size - 1) value].
+ 	barriers := barriers, {heap allocateOldSpaceChunkOfExactlyBytes: (heap bytesInObject: penultimate)}.
+ 	heap setEndOfMemory: barriers last.
+ 	heap allOldSpaceEntitiesDo: [:e| penultimate := ultimate. ultimate := e].
+ 	self assert: (heap addressAfter: ultimate) = barriers last.
+ 	heap checkFreeSpace.
+ 	heap runLeakCheckerForFullGC: true.
+ 	heap segmentManager initializeFromFreeChunks: (barriers sort collect: [:b| heap objectStartingAt: b]).
+ 	heap checkFreeSpace.
+ 	heap runLeakCheckerForFullGC: true.
+ 	sim bereaveAndNormalizeContextsAndFlushExternalPrimitives.
+ 	sim imageName: imageFileName.
+ 	sim writeImageFileIO!



More information about the Vm-dev mailing list