runtime: restore "goroutine in C code" message
In the 1.9 upgrade I took out the word "goroutine" from a traceback
showing a goroutine running in C code, to let TestCgoNumGoroutine
pass. However, it turns out that some code is actually checking for
that string; for example,
https://github.com/grpc/grpc-go/blob/master/test/leakcheck/leakcheck.go#L44
So keep the message the same, and change the test.
Change-Id: I69aff11970313599fa05f4e2e15f0de87660dcca
Reviewed-on: https://go-review.googlesource.com/64850
Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go b/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
index 12fda49..68f1738 100644
--- a/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
+++ b/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
@@ -75,6 +75,7 @@
sbuf := make([]byte, 32<<10)
sbuf = sbuf[:runtime.Stack(sbuf, true)]
n = strings.Count(string(sbuf), "goroutine ")
+ n -= strings.Count(string(sbuf), "goroutine in C code")
if n != want {
fmt.Printf("%s Stack: want %d; got %d:\n%s\n", label, want, n, string(sbuf))
return "", false
diff --git a/libgo/go/runtime/traceback_gccgo.go b/libgo/go/runtime/traceback_gccgo.go
index f29ccd7..37c5698 100644
--- a/libgo/go/runtime/traceback_gccgo.go
+++ b/libgo/go/runtime/traceback_gccgo.go
@@ -216,7 +216,7 @@
print("\tgoroutine running on other thread; stack unavailable\n")
printcreatedby(gp)
} else if readgstatus(gp)&^_Gscan == _Gsyscall {
- print("\tin C code; stack unavailable\n")
+ print("\tgoroutine in C code; stack unavailable\n")
printcreatedby(gp)
} else {
gp.traceback = &tb