mirror of
				https://github.com/golang/go.git
				synced 2025-10-31 16:50:58 +00:00 
			
		
		
		
	[dev.garbage] runtime: Code to implement write barriers
To turn concurrent gc on alter the if false in func gogc currently at line 489 in malloc.go LGTM=rsc R=rsc CC=golang-codereviews, rlh https://golang.org/cl/172190043
This commit is contained in:
		
							parent
							
								
									d8ee1c5a2c
								
							
						
					
					
						commit
						d3d60975b4
					
				
					 5 changed files with 66 additions and 16 deletions
				
			
		|  | @ -486,16 +486,17 @@ func gogc(force int32) { | |||
| 
 | ||||
| 	onM(stoptheworld) | ||||
| 	onM(finishsweep_m) // finish sweep before we start concurrent scan. | ||||
| 	onM(starttheworld) | ||||
| 
 | ||||
| 	// Do a concurrent heap scan before we stop the world. | ||||
| 	onM(gcscan_m) | ||||
| 	onM(gcinstallmarkwb_m) | ||||
| 	onM(stoptheworld) | ||||
| 	//	onM(starttheworld) | ||||
| 	// mark from roots scanned in gcscan_m. startthework when write barrier works | ||||
| 	onM(gcmark_m) | ||||
| 	//	onM(stoptheworld) | ||||
| 	if false {         // To turn on concurrent scan and mark set to true... | ||||
| 		onM(starttheworld) | ||||
| 		// Do a concurrent heap scan before we stop the world. | ||||
| 		onM(gcscan_m) | ||||
| 		onM(stoptheworld) | ||||
| 		onM(gcinstallmarkwb_m) | ||||
| 		onM(starttheworld) | ||||
| 		onM(gcmark_m) | ||||
| 		onM(stoptheworld) | ||||
| 		onM(gcinstalloffwb_m) | ||||
| 	} | ||||
| 	if mp != acquirem() { | ||||
| 		gothrow("gogc: rescheduled") | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rick Hudson
						Rick Hudson