gcc/libgo/go
Ian Lance Taylor 47f68dc231 runtime: make NumGoroutine wait for system goroutines to register
In libgo system goroutines register themselves after they start.
    That means that there is a small race between the goroutine being
    seen by the scheduler and the scheduler knowing that the goroutine
    is a system goroutine. That in turn means that runtime.NumGoroutines
    can overestimate the number of goroutines at times.
    
    This patch fixes the overestimate by counting the number of system
    goroutines waiting to start, and pausing NumGoroutines until those
    goroutines have all registered.
    
    This is kind of a lot of mechanism for this not very important
    problem, but I couldn't think of a better approach.
    
    The test for this is TestNumGoroutine in runtime/proc_test.go.
    The test is not currently run, but it will be soon.
    
    Reviewed-on: https://go-review.googlesource.com/46457

From-SVN: r249565
2017-06-22 15:46:47 +00:00
..
archive libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
bufio libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
builtin libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
bytes Big merge of changes to gofrontend repo that were postponed due to the 2017-05-10 17:26:09 +00:00
cmd libgo: remove old MIPS architecture names 2017-06-21 22:11:04 +00:00
compress libgo: update to go1.8rc2 2017-01-23 22:18:42 +00:00
container libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
context libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
crypto libgo: update to 1.8.3 release 2017-06-08 19:02:12 +00:00
database/sql libgo: update to 1.8.3 release 2017-06-08 19:02:12 +00:00
debug debug/elf: handle Alpha relocs 2017-06-21 22:39:36 +00:00
encoding libgo: update to Go 1.8.1 release 2017-04-17 22:10:58 +00:00
errors libgo: update to go1.7rc3 2016-07-22 18:15:38 +00:00
exp Correct gcc/go/gofrontend/lex.cc and libgo/aclocal.m4 to the versions in the gofrontend repo... 2016-11-18 04:15:46 +00:00
expvar libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
flag libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
fmt libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
go libgo: remove old MIPS architecture names 2017-06-21 22:11:04 +00:00
golang_org/x syscall, golang_org/x/net/lif: fixes for gccgo on Solaris 2017-01-18 03:37:52 +00:00
hash libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
html libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
image libgo: update to Go 1.8.1 release 2017-04-17 22:10:58 +00:00
index/suffixarray libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
internal Forgot to remove this file in the last libgo commit. 2017-06-21 22:29:36 +00:00
io libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
log libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
math Big merge of changes to gofrontend repo that were postponed due to the 2017-05-10 17:26:09 +00:00
mime Big merge of changes to gofrontend repo that were postponed due to the 2017-05-10 17:26:09 +00:00
net libgo: update to 1.8.3 release 2017-06-08 19:02:12 +00:00
os os: use opendir64 and closedir64 on AIX 2017-05-12 00:59:15 +00:00
path Big merge of changes to gofrontend repo that were postponed due to the 2017-05-10 17:26:09 +00:00
plugin libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
reflect Big merge of changes to gofrontend repo that were postponed due to the 2017-05-10 17:26:09 +00:00
regexp libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
runtime runtime: make NumGoroutine wait for system goroutines to register 2017-06-22 15:46:47 +00:00
sort libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
strconv libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
strings libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
sync libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
syscall libgo: remove old MIPS architecture names 2017-06-21 22:11:04 +00:00
testing libgo: update to final Go 1.8 release 2017-02-17 15:43:39 +00:00
text libgo: update to Go 1.8.1 release 2017-04-17 22:10:58 +00:00
time Big merge of changes to gofrontend repo that were postponed due to the 2017-05-10 17:26:09 +00:00
unicode libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00