aboutsummaryrefslogtreecommitdiff
path: root/src/internal/trace/parser.go
diff options
context:
space:
mode:
authorcuiweixie <cuiweixie@gmail.com>2022-09-04 18:02:51 +0800
committerDaniel Martí <mvdan@mvdan.cc>2022-09-06 12:35:13 +0000
commit8a323542190ec3ba8f0ff0ec057e75e25ad1f408 (patch)
treee373c1fef49c1aea03660cb651119701833eb083 /src/internal/trace/parser.go
parent1c50484335ff8c752f872cf730f262b66280b5be (diff)
downloadgo-8a323542190ec3ba8f0ff0ec057e75e25ad1f408.tar.xz
internal/trace: use strings.Builder
Change-Id: Ic7f827b8ee758c991ed76be65026b0330207deea Reviewed-on: https://go-review.googlesource.com/c/go/+/428262 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/internal/trace/parser.go')
-rw-r--r--src/internal/trace/parser.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/trace/parser.go b/src/internal/trace/parser.go
index 866fe8cdd9..b091a85f6a 100644
--- a/src/internal/trace/parser.go
+++ b/src/internal/trace/parser.go
@@ -973,7 +973,7 @@ func PrintEvent(ev *Event) {
func (ev *Event) String() string {
desc := EventDescriptions[ev.Type]
- w := new(bytes.Buffer)
+ w := new(strings.Builder)
fmt.Fprintf(w, "%v %v p=%v g=%v off=%v", ev.Ts, desc.Name, ev.P, ev.G, ev.Off)
for i, a := range desc.Args {
fmt.Fprintf(w, " %v=%v", a, ev.Args[i])