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

commits at source.squeak.org commits at source.squeak.org
Sat Jan 14 15:59:52 UTC 2023


Tom Braun uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog.seperateMarking-WoC.3312.mcz

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

Name: VMMaker.oscog.seperateMarking-WoC.3312
Author: WoC
Time: 14 January 2023, 4:59:28.278534 pm
UUID: fa6771b3-8326-4273-a862-a4b88dc2fa61
Ancestors: VMMaker.oscog.seperateMarking-WoC.3311

preserve the invariant that there are no grey objects after marking, although the forwarders protected here should pose no problem

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

Item was changed:
  ----- Method: SpurIncrementalGarbageCollector>>maybeModifyForwarder: (in category 'object creation barriers') -----
  maybeModifyForwarder: objOop
  
  	"mark forwarders so they do not get garbage collected before they can get resolved. 
  	1. Does only apply to marking because only in this phase we can overlook forwarding references to be resolved (e.g. when 
  	the mutator runs after the first marking pass and an object that is referenced by at least one already black object gets a forwarded -> the pointer of the black object won't get updated in this marking pass and during sweeping the forwarding pointer will get removed).
  	2. Does not apply to sweeping or compacting because the forwarder is set on the header of the original object, which already includes 
  	the correcty set mark bit"
  	self assert: (manager isForwarded: objOop).
  	((manager isOldObject: objOop) and: [marker isCurrentlyMarking])
+ 		ifTrue: [marker setIsMarkedOf: objOop.
+ 			
+ 			"make sure to grey the forwarder. Maybe the object was pushed on the marking stack before and made grey.
+ 			Although I am not sure that really present an error, as the object should be collected in the next gc cycle and
+ 			nobody tries to mark from a forwarder which could cause objects being lost. For now lets preserver the invariant
+ 			that the heap is completely unmarked and ungrey after sweeping (and sweeping does not unset grey bits"
+ 			manager setIsGreyOf: objOop to: false]!
- 		ifTrue: [marker setIsMarkedOf: objOop]!



More information about the Vm-dev mailing list