aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/internal/graph
diff options
context:
space:
mode:
authorHeschi Kreinick <heschi@google.com>2022-03-16 18:17:58 -0400
committerGopher Robot <gobot@golang.org>2022-03-18 18:48:36 +0000
commit7e5804cb7014bf3154542a3d2afc68c3a61b7452 (patch)
tree7de804293b5c1d7057bff7924cce0bf5648e464b /src/cmd/vendor/github.com/google/pprof/internal/graph
parent9f252a0462bd8c279beec56d1538e8a6c26c44c5 (diff)
downloadgo-7e5804cb7014bf3154542a3d2afc68c3a61b7452.tar.xz
cmd: update vendored pprof
go get github.com/google/pprof@latest go mod vendor Plus a tiny change to the pprof command to match an upstream interface change. Updates #36905. Change-Id: I4c7bbe8c317a6eeb217fce971b208f96ab0727fa Reviewed-on: https://go-review.googlesource.com/c/go/+/393370 Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> Auto-Submit: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/graph')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/graph/dotgraph.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/graph/dotgraph.go b/src/cmd/vendor/github.com/google/pprof/internal/graph/dotgraph.go
index 8008675248..9ff4c95adb 100644
--- a/src/cmd/vendor/github.com/google/pprof/internal/graph/dotgraph.go
+++ b/src/cmd/vendor/github.com/google/pprof/internal/graph/dotgraph.go
@@ -126,7 +126,7 @@ func (b *builder) addLegend() {
return
}
title := labels[0]
- fmt.Fprintf(b, `subgraph cluster_L { "%s" [shape=box fontsize=16`, title)
+ fmt.Fprintf(b, `subgraph cluster_L { "%s" [shape=box fontsize=16`, escapeForDot(title))
fmt.Fprintf(b, ` label="%s\l"`, strings.Join(escapeAllForDot(labels), `\l`))
if b.config.LegendURL != "" {
fmt.Fprintf(b, ` URL="%s" target="_blank"`, b.config.LegendURL)
@@ -485,7 +485,7 @@ func escapeAllForDot(in []string) []string {
// escapeForDot escapes double quotes and backslashes, and replaces Graphviz's
// "center" character (\n) with a left-justified character.
-// See https://graphviz.org/doc/info/attrs.html#k:escString for more info.
+// See https://graphviz.org/docs/attr-types/escString/ for more info.
func escapeForDot(str string) string {
return strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(str, `\`, `\\`), `"`, `\"`), "\n", `\l`)
}