• Michael Anthony Knyszek's avatar
    runtime: add scavtrace debug flag and remove scavenge info from gctrace · 8ac98e7b
    Michael Anthony Knyszek authored
    Currently, scavenging information is printed if the gctrace debug
    variable is >0. Scavenging information is also printed naively, for
    every page scavenged, resulting in a lot of noise when the typical
    expectation for GC trace is one line per GC.
    
    This change adds a new GODEBUG flag called scavtrace which prints
    scavenge information roughly once per GC cycle and removes any scavenge
    information from gctrace. The exception is debug.FreeOSMemory, which may
    force an additional line to be printed.
    
    Fixes #32952.
    
    Change-Id: I4177dcb85fe3f9653fd74297ea93c97c389c1811
    Reviewed-on: https://go-review.googlesource.com/c/go/+/212640
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: default avatarAustin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    8ac98e7b
runtime1.go 12 KB