diff options
| author | David Crawshaw <crawshaw@golang.org> | 2016-11-02 09:10:29 -0400 |
|---|---|---|
| committer | David Crawshaw <crawshaw@golang.org> | 2016-11-02 13:49:25 +0000 |
| commit | 47c1715ba5ea7d5ecc9eff846f448d8a3b62808d (patch) | |
| tree | e4e40957247627f6f1b8854eb9904cd6222bb16c /src | |
| parent | 7bf0fc9fc392acee87bcdb4b1e474e342cb70f92 (diff) | |
| download | go-47c1715ba5ea7d5ecc9eff846f448d8a3b62808d.tar.xz | |
runtime: address comments from CL 32357
Change-Id: I174d7307bfdd8ec57bb4266dab8569fd2234abb4
Reviewed-on: https://go-review.googlesource.com/32610
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/proc.go | 2 | ||||
| -rw-r--r-- | src/runtime/symtab.go | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 1f47dc4de4..baec534aaf 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -475,7 +475,7 @@ func schedinit() { goargs() goenvs() parsedebugvars() - gcinit() // requires modulesinit + gcinit() sched.lastpoll = uint64(nanotime()) procs := ncpu diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go index 9ec95d7a0c..bba3ccfc20 100644 --- a/src/runtime/symtab.go +++ b/src/runtime/symtab.go @@ -267,13 +267,10 @@ func activeModules() []*moduledata { // // Only one goroutine may call modulesinit at a time. func modulesinit() { - oldNum := len(activeModules()) modules := new([]*moduledata) - num := 0 for md := &firstmoduledata; md != nil; md = md.next { *modules = append(*modules, md) - num++ - if num > oldNum { + if md.gcdatamask == (bitvector{}) { md.gcdatamask = progToPointerMask((*byte)(unsafe.Pointer(md.gcdata)), md.edata-md.data) md.gcbssmask = progToPointerMask((*byte)(unsafe.Pointer(md.gcbss)), md.ebss-md.bss) } |
