• Austin Clements's avatar
    [dev.garbage] runtime: fix allocfreetrace · 6d114905
    Austin Clements authored
    We broke tracing of freed objects in GODEBUG=allocfreetrace=1 mode
    when we removed the sweep over the mark bitmap. Fix it by
    re-introducing the sweep over the bitmap specifically if we're in
    allocfreetrace mode. This doesn't have to be even remotely efficient,
    since the overhead of allocfreetrace is huge anyway, so we can keep
    the code for this down to just a few lines.
    
    Change-Id: I9e176b3b04c73608a0ea3068d5d0cd30760ebd40
    Reviewed-on: https://go-review.googlesource.com/22592
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarRick Hudson <rlh@golang.org>
    6d114905
malloc.go 31.2 KB