• Austin Clements's avatar
    runtime: include scalar slots in GC scan work metric · 53c53984
    Austin Clements authored
    The garbage collector predicts how much "scan work" must be done in a
    cycle to determine how much work should be done by mutators when they
    allocate. Most code doesn't care what units the scan work is in: it
    simply knows that a certain amount of scan work has to be done in the
    cycle. Currently, the GC uses the number of pointer slots scanned as
    the scan work on the theory that this is the bulk of the time spent in
    the garbage collector and hence reflects real CPU resource usage.
    However, this metric is difficult to estimate at the beginning of a
    cycle.
    
    Switch to counting the total number of bytes scanned, including both
    pointer and scalar slots. This is still less than the total marked
    heap since it omits no-scan objects and no-scan tails of objects. This
    metric may not reflect absolute performance as well as the count of
    scanned pointer slots (though it still takes time to scan scalar
    fields), but it will be much easier to estimate robustly, which is
    more important.
    
    Change-Id: Ie3a5eeeb0384a1ca566f61b2f11e9ff3a75ca121
    Reviewed-on: https://go-review.googlesource.com/9694Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    53c53984
Name
Last commit
Last update
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...