]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/trace: use newTaskDesc to create taskDesc
authorLeonard Wang <wangdeyu0907@gmail.com>
Mon, 19 Jul 2021 16:05:16 +0000 (00:05 +0800)
committerMichael Pratt <mpratt@google.com>
Tue, 17 Aug 2021 16:22:15 +0000 (16:22 +0000)
Change-Id: I9bec8e2c4a9e1b9aa2baf883504200b5674844f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/335609
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Trust: Michael Pratt <mpratt@google.com>

src/cmd/trace/annotations.go

index 9b45457436bda9966ec698eea03b55718a468f24..1c0dad56d849e6af89f30f5cf405e0598d72f967 100644 (file)
@@ -407,10 +407,7 @@ func (tasks allTasks) task(taskID uint64) *taskDesc {
                return t
        }
 
-       t = &taskDesc{
-               id:         taskID,
-               goroutines: make(map[uint64]struct{}),
-       }
+       t = newTaskDesc(taskID)
        tasks[taskID] = t
        return t
 }