[Vm-dev] VM Maker: Cog-eem.312.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jan 10 16:35:56 UTC 2016
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.312.mcz
==================== Summary ====================
Name: Cog-eem.312
Author: eem
Time: 10 January 2016, 8:35:43.083174 am
UUID: a10ff417-a026-4d1c-88be-ae4f006adf5f
Ancestors: Cog-eem.311
Set the stack alignment for x64 to 32 since at least Mac OS X expects this.
Remember to copy across the screen size when bootstrapping a 64-bit image and nuke the ancient hacked segmented save code.
=============== Diff against Cog-eem.311 ===============
Item was changed:
----- Method: BochsX64Alien>>initializeStackFor: (in category 'processor setup') -----
initializeStackFor: aCogit
"Different cpus need different stack alignment etc, so handle the details here."
"From the System V ABI:
3.2.2 The Stack Frame
... The end of the input argument area shall be aligned on a 16 (32, if __m256 is
passed on stack) byte boundary. In other words, the value (%rsp + 8) is always
a multiple of 16 (32) when control is transferred to the function entry point."
| stackAlignment |
+ stackAlignment := 32.
- stackAlignment := 16.
aCogit setStackAlignment: stackAlignment expectedSPOffset: 0 expectedFPOffset: 16.
PostBuildStackDelta := stackAlignment > 16
ifTrue: [stackAlignment - 16]
ifFalse: [0]!
Item was changed:
----- Method: SpurBootstrap>>writeSnapshot:ofTransformedImage:headerFlags:screenSize: (in category 'testing') -----
writeSnapshot: imageFileName ofTransformedImage: spurHeap headerFlags: headerFlags screenSize: screenSizeInteger
"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 sim |
- | penultimate ultimate sizes counts barriers sim |
sim := StackInterpreterSimulator onObjectMemory: spurHeap.
sim bootstrapping: true.
spurHeap
coInterpreter: sim;
setEndOfMemory: spurHeap endOfMemory + spurHeap bridgeSize. "hack; initializeInterpreter: cuts it back by bridgeSize"
sim initializeInterpreter: 0;
setImageHeaderFlagsFrom: headerFlags;
+ setSavedWindowSize: screenSizeInteger;
setDisplayForm: nil.
spurHeap allOldSpaceEntitiesDo: [:e| penultimate := ultimate. ultimate := e].
+ "Check that we've left behind the old, pre-pigCompact segmented save"
+ self assert: (spurHeap isFreeObject: penultimate) not.
- (spurHeap isFreeObject: penultimate) ifTrue: "old, pre-pigCompact segmented save"
- [self assert: (spurHeap isSegmentBridge: ultimate).
- sizes := Bag new.
- spurHeap allObjectsInFreeTree: (spurHeap freeLists at: 0) do:
- [:f|
- sizes add: (spurHeap bytesInObject: f)].
- counts := sizes sortedCounts.
- self assert: counts last key = 1. "1 huge chunk"
- counts size > 1
- ifTrue:
- [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| spurHeap allocateOldSpaceChunkOfExactlyBytes: (counts at: counts size - 1) value].
- barriers := barriers, {spurHeap allocateOldSpaceChunkOfExactlyBytes: (spurHeap bytesInObject: penultimate)}]
- ifFalse:
- [barriers := {spurHeap allocateOldSpaceChunkOfExactlyBytes: (spurHeap bytesInObject: penultimate)}].
- barriers last ifNotNil:
- [:end|
- spurHeap setEndOfMemory: end.
- spurHeap allOldSpaceEntitiesDo: [:e| penultimate := ultimate. ultimate := e].
- self assert: (spurHeap addressAfter: ultimate) = end]].
spurHeap checkFreeSpace.
spurHeap runLeakCheckerForFullGC.
- barriers ifNotNil: "old, pre-pigCompact segmented save"
- [spurHeap segmentManager initializeFromFreeChunks: (barriers sort collect: [:b| spurHeap objectStartingAt: b])].
- spurHeap checkFreeSpace.
- spurHeap runLeakCheckerForFullGC.
sim bereaveAllMarriedContextsForSnapshotFlushingExternalPrimitivesIf: true.
sim imageName: imageFileName.
sim writeImageFileIO.
Transcript cr; show: 'Done!!'!
More information about the Vm-dev
mailing list