]> Cypherpunks repositories - gostls13.git/commit
[dev.garbage] runtime: revive sweep fast path
authorAustin Clements <austin@google.com>
Fri, 29 Apr 2016 14:57:06 +0000 (10:57 -0400)
committerAustin Clements <austin@google.com>
Fri, 29 Apr 2016 15:25:28 +0000 (15:25 +0000)
commitb3579c095e00f89d8c92c2aa4fb4af222a96f429
treeadb91808bf62656c7d74be8cb932110ecfe41f2c
parentd97625ae9e7195a68d1c9f2b2ff54eb85545982e
[dev.garbage] runtime: revive sweep fast path

sweep used to skip mcental.freeSpan (and its locking) if it didn't
find any new free objects. We lost that optimization when the
freed-object counting changed in dad83f7 to count total free objects
instead of newly freed objects.

The previous commit brings back counting of newly freed objects, so we
can easily revive this optimization by checking that count (like we
used to) instead of the total free objects count.

Change-Id: I43658707a1c61674d0366124d5976b00d98741a9
Reviewed-on: https://go-review.googlesource.com/22596
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcsweep.go