Sorry. 
Which I understand is that 'sweep termination = clean up = release the 
physical memory'
The long comment is helpful.
I got 
'b. Sweep any unswept spans. There will only be unswept spans if this GC 
cycle was forced before the expected time.'
Dose it means 'sweep = scan the root span', like java cms 'gc root scan'? 
not the release the physical memory?

在 2019年6月21日星期五 UTC+8上午8:54:31,Ian Lance Taylor写道:
>
> On Thu, Jun 20, 2019 at 9:56 AM Chou Yan <yan.ch...@gmail.com 
> <javascript:>> wrote: 
> > 
> > I look up the doc for gctrace: 
> > https://godoc.org/runtime 
> > it show us: 
> > 
> > Currently, it is: 
> > gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # 
> P 
> > where the fields are as follows: 
> > gc #        the GC number, incremented at each GC 
> > @#s         time in seconds since program start 
> > #%          percentage of time spent in GC since program start 
> > #+...+#     wall-clock/CPU times for the phases of the GC 
> > #->#-># MB  heap size at GC start, at GC end, and live heap 
> > # MB goal   goal heap size 
> > # P         number of processors used 
> > The phases are stop-the-world (STW) sweep termination, concurrent 
> > mark and scan, and STW mark termination. The CPU times 
> > for mark/scan are broken down in to assist time (GC performed in 
> > line with allocation), background GC time, and idle GC time. 
> > If the line ends with "(forced)", this GC was forced by a 
> > runtime.GC() call. 
> > 
> > 
> > I am very confused. Will it be swt in the cleanup phase? 
>
> I'm sorry, I don't understand what you are asking.  What is the cleanup 
> phase? 
>
> > And how many times gc stw? mark start? concurrent mark? remark ? or 
> sweep ? 
>
> See the long comment near the top of runtime/mgc.go.  Currently each 
> cycle stops the world twice, very briefly, in the sweep termination 
> and mark termination phases. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/58a54b06-271c-4c39-a891-2ec157c42ee9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to