[Vm-dev] VM Maker: VMMaker.oscog.seperateMarking-WoC.3304.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 12 22:55:50 UTC 2023

Tom Braun uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscog.seperateMarking-WoC.3304
Author: WoC
Time: 12 January 2023, 11:55:24.18587 pm
UUID: da8e55d1-1ff6-4125-8be0-dd141c51396a
Ancestors: VMMaker.oscog.seperateMarking-WoC.3303

When migrating an object replace the old reference in the remembered set with the new one. Otherwise the forwarder would be kept there for no real reason and maybe even would stay alive for quite a long time (imagine the forwarder being in an image we freed completetly. It is hidden inside a free chunk and the sweeper will not be able to find and let the scavenger forget the forwarder -> forget it directly)

=============== Diff against VMMaker.oscog.seperateMarking-WoC.3303 ===============

Item was added:
+ ----- Method: SpurGenerationScavenger>>remember:insteadOf: (in category 'gc - global') -----
+ remember: newObjOop insteadOf: oldObjOop
+ 	"Replace a forwarder by the object it is pointing to in the remembered set. This method is designed to
+ 	work with migrate:sized:to: from the SpurIncrementalCompactor family"
+ 	self assert: rememberedSetSize > 0.
+ 	self assert: (manager isRemembered: oldObjOop).
+ 	self assert: (manager isRemembered: newObjOop).
+ 	manager setIsRememberedOf: oldObjOop to: false.
+ 	[| index |
+ 	 index := 0.
+ 	 [index < rememberedSetSize] whileTrue:
+ 		[oldObjOop = (rememberedSet at: index)
+ 			ifTrue:
+ 				[rememberedSet at: index put: newObjOop.
+ 				 index := rememberedSetSize]
+ 			ifFalse: [index := index + 1]]].!

Item was changed:
  ----- Method: SpurIncrementalCompactingSweeper>>migrate:sized:to: (in category 'incremental compact') -----
  migrate: obj sized: bytesToCopy to: address
  	| copy |
  	self assert: (manager isPinned: obj) not. 
  	manager memcpy: address asVoidPointer _: (manager startOfObject: obj) asVoidPointer _: bytesToCopy.
  	copy := manager objectStartingAt: address.
  	 (manager isRemembered: copy) ifTrue: 
+ 		[scavenger remember: copy insteadOf: obj].
- 		["copy has the remembered bit set, but is not in the remembered table."
- 		 manager setIsRememberedOf: copy to: false.
- 		 scavenger remember: copy].
  	 manager forward: obj to: (manager objectStartingAt: address). 
  	^ copy!

More information about the Vm-dev mailing list