libgo: build roots index to speed up bulkBarrierPreWrite
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 13 Sep 2018 16:44:43 +0000 (16:44 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 13 Sep 2018 16:44:43 +0000 (16:44 +0000)
commit2919ad1ee3bf475c8f3aae44c2aec694a9843c4d
treecf54f17b22cc8d27bc1149aa3f7b310f13749579
parent16ddcc28b5b1984d4ab51be4fb5e5b3870b21c89
libgo: build roots index to speed up bulkBarrierPreWrite

    To reduce the amount of time spent in write barrier processing
    (specifically runtime.bulkBarrierPreWrite), add support for building a
    'GC roots index', basically a sorted list of all roots, so as to
    allow more efficient lookups of gcdata structures for globals. The
    previous implementation worked on the raw (unsorted) roots list
    itself, which did not scale well.

    Reviewed-on: https://go-review.googlesource.com/132595

From-SVN: r264276
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc
libgo/go/runtime/cgocall.go
libgo/go/runtime/mbitmap.go
libgo/go/runtime/mgc_gccgo.go
libgo/go/runtime/proc.go