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

commits at source.squeak.org commits at source.squeak.org
Wed Sep 11 00:46:26 UTC 2013


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

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

Name: Cog-eem.83
Author: eem
Time: 10 September 2013, 5:46:13.794 pm
UUID: fa54c636-dc1b-4884-b8e7-73745b128318
Ancestors: Cog-eem.82

Add a sane scavenging-aware setGCParameters to the bootstrap.
Hence add support for float literals in installable methods.
Print ...done, when done transforming.

=============== Diff against Cog-eem.82 ===============

Item was added:
+ ----- Method: SpurBootstrap class>>SmalltalkImagePROTOTYPEsetGCParameters (in category 'method prototypes') -----
+ SmalltalkImagePROTOTYPEsetGCParameters
+ 	"Adjust the VM's default GC parameters to avoid too much tenuring.
+ 	 Maybe this should be left to the VM?"
+ 
+ 	| proportion edenSize survivorSize averageObjectSize numObjects |
+ 	proportion := 0.9. "tenure when 90% of pastSpace is full"
+ 	edenSize := SmalltalkImage current vmParameterAt: 44.
+ 	survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur does the same :-)"
+ 	averageObjectSize := 8 * self wordSize. "a good approximation"
+ 	numObjects := (proportion * survivorSize / averageObjectSize) rounded.
+ 	SmalltalkImage current vmParameterAt: 6 put: numObjects  "tenure when more than this many objects survive the GC"!

Item was added:
+ ----- Method: SpurBootstrap class>>SystemDictionaryPROTOTYPEsetGCParameters (in category 'method prototypes') -----
+ SystemDictionaryPROTOTYPEsetGCParameters
+ 	"Adjust the VM's default GC parameters to avoid too much tenuring.
+ 	 Maybe this should be left to the VM?"
+ 
+ 	| proportion edenSize survivorSize averageObjectSize numObjects |
+ 	proportion := 0.9. "tenure when 90% of pastSpace is full"
+ 	edenSize := SmalltalkImage current vmParameterAt: 44.
+ 	survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur does the same :-)"
+ 	averageObjectSize := 8 * self wordSize. "a good approximation"
+ 	numObjects := (proportion * survivorSize / averageObjectSize) rounded.
+ 	SmalltalkImage current vmParameterAt: 6 put: numObjects  "tenure when more than this many objects survive the GC"!

Item was changed:
  ----- Method: SpurBootstrap>>bootstrapImage (in category 'bootstrap image') -----
  bootstrapImage
+ 	Transcript cr; nextPutAll: 'transforming image...'; flush.
- 	Transcript cr; nextPutAll: 'transforming image'; flush.
  	self cloneNilTrueAndFalse.
  	self buildClassMap.
  	self allocateClassTable.
  	self cloneObjects.
  	self fillInObjects.
+ 	self fillInClassTable.
+ 	Transcript nextPutAll: 'done.'; flush.!
- 	self fillInClassTable!

Item was changed:
  ----- Method: SpurBootstrap>>findLiteral: (in category 'bootstrap methods') -----
  findLiteral: aLiteral
  	| symbolOop smalltalk array |
  	aLiteral isString ifTrue:
  		[^self stringFor: aLiteral].
+ 	aLiteral isFloat ifTrue:
+ 		[^oldInterpreter floatObjectOf: aLiteral].
  	self assert: aLiteral isVariableBinding.
  	symbolOop := self findSymbol: aLiteral key.
  	smalltalk := oldHeap splObj: 8.
  	array := oldHeap fetchPointer: 1 ofObject: smalltalk.
  	self assert: (oldHeap isArray: array).
  	0 to: (oldHeap fetchWordLengthOf: array) - 1 do:
  		[:i| | bindingOrNil |
  		bindingOrNil := oldHeap fetchPointer: i ofObject: array.
  		(bindingOrNil ~= oldHeap nilObject
  		 and: [symbolOop = (oldHeap fetchPointer: KeyIndex ofObject: bindingOrNil)
  		 and: [aLiteral key == #Smalltalk
  				ifTrue:
  					[(oldHeap fetchPointer: ValueIndex ofObject: bindingOrNil) = smalltalk]
  				ifFalse:
  					[oldInterpreter
  						classNameOf: (oldHeap fetchPointer: ValueIndex ofObject: bindingOrNil)
  						Is: aLiteral key]]]) ifTrue:
  			[^bindingOrNil]].
  	self error: 'couldn''t find literal ', aLiteral printString!



More information about the Vm-dev mailing list