mirror of
https://github.com/golang/go
synced 2024-09-19 07:52:34 +00:00
runtime/pprof: fix test
gogo called from GC is okay for the same reasons that gogo called from System or ExternalCode is okay. All three are fake stack traces. Fixes #8408. LGTM=dvyukov, r R=r, dvyukov CC=golang-codereviews https://golang.org/cl/152580043
This commit is contained in:
parent
58e357ef16
commit
fb173c4185
|
@ -249,7 +249,7 @@ func TestGoroutineSwitch(t *testing.T) {
|
|||
// exists to record a PC without a traceback. Those are okay.
|
||||
if len(stk) == 2 {
|
||||
f := runtime.FuncForPC(stk[1])
|
||||
if f != nil && (f.Name() == "System" || f.Name() == "ExternalCode") {
|
||||
if f != nil && (f.Name() == "System" || f.Name() == "ExternalCode" || f.Name() == "GC") {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue