From 69830d4a3c614d329c21f1b279716a5d41fdbbec Mon Sep 17 00:00:00 2001 From: doujiang24 Date: Thu, 23 Jun 2022 10:33:14 +0800 Subject: [PATCH] do not need to hack system g. --- src/cmd/trace/trace.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/trace/trace.go b/src/cmd/trace/trace.go index 7dcb17d388a26..0139639dae5c1 100644 --- a/src/cmd/trace/trace.go +++ b/src/cmd/trace/trace.go @@ -1136,8 +1136,7 @@ func (ctx *traceContext) buildBranch(parent frameNode, stk []*trace.Frame) int { func isSystemGoroutine(entryFn string) bool { // This mimics runtime.isSystemGoroutine as closely as // possible. - // Also, locked g in extra M (with empty entryFn) is system goroutine. - return entryFn == "" || entryFn != "runtime.main" && strings.HasPrefix(entryFn, "runtime.") + return entryFn != "runtime.main" && strings.HasPrefix(entryFn, "runtime.") } // firstTimestamp returns the timestamp of the first event record.