[Vm-dev] VM Maker: Cog-eem.111.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Oct 11 00:38:13 UTC 2013
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.111.mcz
==================== Summary ====================
Name: Cog-eem.111
Author: eem
Time: 10 October 2013, 5:37:54.637 pm
UUID: 3fe28084-a06d-4c40-b532-0a2385f4ed6e
Ancestors: Cog-eem.110
In writing the snapshot of the transformed image, be more careful
with the last free chunk that gets turned into a bridge.
Add more asserts.
=============== Diff against Cog-eem.110 ===============
Item was changed:
----- Method: SpurBootstrap>>writeSnapshotOfTransformedImage (in category 'testing') -----
writeSnapshotOfTransformedImage
"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."
| last heap sizes counts barriers sim |
heap := TransformedImage veryDeepCopy.
sim := StackInterpreterSimulator onObjectMemory: heap.
heap coInterpreter: sim.
sim initializeInterpreter: 0;
setImageHeaderFlagsFrom: ImageHeaderFlags.
heap allOldSpaceEntitiesDo: [:e| last := e].
self assert: (heap isFreeObject: last).
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: last)}.
+ heap setEndOfMemory: barriers last.
+ heap allOldSpaceEntitiesDo: [:e| last := e].
+ self assert: (heap addressAfter: last) = barriers last.
+ heap checkFreeSpace.
+ heap runLeakCheckerForFullGC: true.
+ heap segmentManager initializeFromFreeChunks: (barriers sort collect: [:b| heap objectStartingAt: b]).
- heap segmentManager initializeFromFreeChunks:
- (barriers sort collect: [:b| heap objectStartingAt: b]),
- { last }.
sim imageName: 'spur.image'.
sim writeImageFileIO!
More information about the Vm-dev
mailing list