]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: don't use cached wbuf in markroot
authorAustin Clements <austin@google.com>
Thu, 12 Mar 2015 17:03:50 +0000 (13:03 -0400)
committerAustin Clements <austin@google.com>
Thu, 19 Mar 2015 15:55:16 +0000 (15:55 +0000)
Currently markroot fetches the wbuf to fill from the per-M wbuf
cache. The wbuf cache is primarily meant for the write barrier because
it produces very little work on each call. There's little point to
using the cache in mark root, since each call to markroot is likely to
produce a large amount of work (so the slight win on getting it from
the cache instead of from the central wbuf lists doesn't matter), and
markroot does not dispose the wbuf back to the cache (so most markroot
calls won't get anything from the wbuf cache anyway).

Instead, just get the wbuf from the central wbuf lists like other work
producers. This will simplify later changes.

Change-Id: I07a18a4335a41e266a6d70aa3a0911a40babce23
Reviewed-on: https://go-review.googlesource.com/7732
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go

index 1be69fe0629b5d14ceba3ae1de2782d52027f680..a5ec31c30c2fac2f72424ae71c36b17bb49c4bd2 100644 (file)
@@ -56,7 +56,6 @@ var oneptr = [...]uint8{typePointer}
 //go:nowritebarrier
 func markroot(desc *parfor, i uint32) {
        var gcw gcWorkProducer
-       gcw.initFromCache()
 
        // Note: if you add a case here, please also update heapdump.go:dumproots.
        switch i {