[Vm-dev] VM Maker: VMMaker.oscog-eem.379.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Sep 14 16:27:38 UTC 2013


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

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

Name: VMMaker.oscog-eem.379
Author: eem
Time: 14 September 2013, 9:24:48.034 am
UUID: 1fc32990-4889-468f-ad1e-bc6054d9175d
Ancestors: VMMaker.oscog-eem.378

Get Spur to correctly initialize the scavengeThreshold post bootstrap
or all hell breaks loose when nil is overwritten ;-).

Bootstrap now tries to scavenger 2822 objects into the rehash phase.

Add the start of scavenging VM state, prior to refactoring all
	(objectMemory isIntegerObject: oop) ifFalse:
		[oop := objectMemory remap: oop]
into something like
	(objectMemory mustRemapOop: oop) ifFalse:
		[oop := objectMemory remap: oop]
which can suit the scavenge also and avoid a lot of writes!!

=============== Diff against VMMaker.oscog-eem.378 ===============

Item was added:
+ ----- Method: CoInterpreterMT>>scavengeVMState (in category 'garbage collection') -----
+ scavengeVMState
+ 	"Scavenge all VM state.  We piggy-back off the ObjectMemory map
+ 	 routines which are run after its maskAndTrace routines.  But here remap:
+ 	 actually means scavenge."
+ 	self shouldBeImplemented!

Item was removed:
- ----- Method: NewCoObjectMemorySimulator>>forceInterruptCheck (in category 'simulation only') -----
- forceInterruptCheck
- 	"hack around the CoInterpreter/ObjectMemory split refactoring"
- 	^coInterpreter forceInterruptCheck!

Item was changed:
  ----- Method: NewObjectMemory>>scheduleIncrementalGC (in category 'garbage collection') -----
  scheduleIncrementalGC
- 	<api>
  	needGCFlag := true.
+ 	coInterpreter forceInterruptCheck!
- 	self forceInterruptCheck!

Item was removed:
- ----- Method: NewObjectMemorySimulator>>forceInterruptCheck (in category 'simulation only') -----
- forceInterruptCheck
- 	"hack around the CoInterpreter/ObjectMemory split refactoring"
- 	^coInterpreter forceInterruptCheck!

Item was added:
+ ----- Method: SpurGenerationScavenger>>edenBytes (in category 'accessing') -----
+ edenBytes
+ 	^eden limit - eden start!

Item was changed:
  ----- Method: SpurGenerationScavenger>>scavenge (in category 'scavenger') -----
  scavenge
  	"The main routine, scavenge, scavenges young objects reachable from the roots (the stack zone
  	 and the rememberedTable).  It first scavenges the new objects immediately reachable from the
  	 stack zone, then those directly from old ones (all in the remembered table).  Then it scavenges
  	 those that are transitively reachable.  If this results in a promotion, the promotee gets remembered,
  	 and it first scavenges objects adjacent to the promotee, then scavenges the ones reachable from
  	 the promoted.  This loop continues until no more reachable objects are left.  At that point,
  	 pastSurvivorSpace is exchanged with futureSurvivorSpace.
  
  	 Notice that each pointer in a live object is inspected once and only once.  The previousRememberedSetSize
  	 and previousFutureSurvivorSpaceSize variables ensure that no object is scanned twice, as well as
  	 detecting closure.  If this were not true, some pointers might get forwarded twice."
  
+ 	coInterpreter scavengeVMState.
- 	coInterpreter scavengeStacks.
  	self scavengeLoop.
  	self exchange: pastSpace with: futureSpace.
  	self computeTenuringThreshold!

Item was changed:
  ----- Method: SpurMemoryManager>>initializePostBootstrap (in category 'simulation') -----
  initializePostBootstrap
  	"The heap has just been bootstrapped into a modified newSpace occupying all of memory above newSPace (and the codeZone).
  	 Put things back to some kind of normalicy."
  	freeOldSpaceStart := freeStart.
+ 	freeStart := scavenger eden start.
+ 	scavengeThreshold := scavenger eden limit - (scavenger edenBytes / 64)!
- 	freeStart := scavenger eden start!

Item was added:
+ ----- Method: SpurMemoryManager>>scheduleScavenge (in category 'garbage collection') -----
+ scheduleScavenge
+ 	needGCFlag := true.
+ 	coInterpreter forceInterruptCheck!

Item was added:
+ ----- Method: SpurMemoryManager>>sufficientSpaceAfterGC: (in category 'garbage collection') -----
+ sufficientSpaceAfterGC: numBytes
+ 	"This is ObjectMemoiry's funky entry-point into its incremental GC,
+ 	 which is a stop-the-world a young generation reclaimer.  In Spur
+ 	 we run the scavenger."
+ 	self assert: numBytes = 0.
+ 	scavenger scavenge!

Item was added:
+ ----- Method: StackInterpreter>>scavengeVMState (in category 'garbage collection') -----
+ scavengeVMState
+ 	"Scavenge all VM state.  We piggy-back off the ObjectMemory map
+ 	 routines which are run after its maskAndTrace routines.  But here remap:
+ 	 actually means scavenge."
+ 	| oop |
+ 	self mapStackPages.
+ 	self mapMachineCode.
+ 	self mapTraceLogs.
+ 	self mapVMRegisters.
+ 	self mapProfileState.
+ 	tempOop ~= 0 ifTrue:
+ 		[tempOop := objectMemory remap: tempOop].
+ 	1 to: objectMemory remapBufferCount do: [:i | 
+ 		oop := objectMemory remapBuffer at: i.
+ 		(objectMemory isIntegerObject: oop) ifFalse:
+ 			[objectMemory remapBuffer at: i put: (objectMemory remap: oop)]].
+ 
+ 	"Callback support - trace suspended callback list"
+ 	1 to: jmpDepth do:[:i|
+ 		oop := suspendedCallbacks at: i.
+ 		(objectMemory isIntegerObject: oop) ifFalse:
+ 			[suspendedCallbacks at: i put: (objectMemory remap: oop)].
+ 		oop := suspendedMethods at: i.
+ 		(objectMemory isIntegerObject: oop) ifFalse:
+ 			[suspendedMethods at: i put: (objectMemory remap: oop)]]!



More information about the Vm-dev mailing list