diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-09-13 16:44:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-09-13 16:44:43 +0000 |
commit | 2919ad1ee3bf475c8f3aae44c2aec694a9843c4d (patch) | |
tree | cf54f17b22cc8d27bc1149aa3f7b310f13749579 /gcc | |
parent | 16ddcc28b5b1984d4ab51be4fb5e5b3870b21c89 (diff) | |
download | gcc-2919ad1ee3bf475c8f3aae44c2aec694a9843c4d.zip gcc-2919ad1ee3bf475c8f3aae44c2aec694a9843c4d.tar.gz gcc-2919ad1ee3bf475c8f3aae44c2aec694a9843c4d.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 1afbcb4..ca47d87 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -acf852f838e6b99f907d84648be853fa2c374393 +70bd9801911f8ed27df410d36a928166c37a68fd The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index c16b40e..dd6733f 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -1535,7 +1535,8 @@ Gogo::write_globals() // Avoid putting runtime.gcRoots itself on the list. if (this->compiling_runtime() && this->package_name() == "runtime" - && Gogo::unpack_hidden_name(no->name()) == "gcRoots") + && (Gogo::unpack_hidden_name(no->name()) == "gcRoots" + || Gogo::unpack_hidden_name(no->name()) == "gcRootsIndex")) ; else var_gc.push_back(no); |