Skip to content

Commit

Permalink
do not need to hack system g.
Browse files Browse the repository at this point in the history
  • Loading branch information
doujiang24 committed Jun 23, 2022
1 parent bed07ae commit 69830d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cmd/trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 69830d4

Please sign in to comment.