• Austin Clements's avatar
    runtime: avoid tracking spans with no objects with mcentral · 70d7e96c
    Austin Clements authored
    Lazy mcache flushing (golang.org/cl/134783) made it so that moving a
    span from an mcache to an mcentral was sometimes responsible for
    sweeping the span. However, it did a "preserving" sweep, which meant
    it retained ownership, even if the sweeper swept all objects in the
    span. As a result, we could put a completely unused span back in the
    mcentral.
    
    Fix this by first taking back ownership of the span into the mcentral
    and moving it to the right mcentral list, and then doing a
    non-preserving sweep. The non-preserving sweep will move the span to
    the heap if it sweeps all objects.
    
    Change-Id: I244b1893b44b8c00264f0928ac9239449775f617
    Reviewed-on: https://go-review.googlesource.com/c/140597
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMichael Knyszek <mknyszek@google.com>
    70d7e96c
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...