aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/profile/encode.go
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2023-08-15 11:45:57 -0400
committerGopher Robot <gobot@golang.org>2023-08-15 16:39:48 +0000
commit4d2855b55d8feb56eebc1fffb82c26b2ffc937b4 (patch)
tree44255974ff88b74c45637b25151d6e98fd1534f2 /src/cmd/vendor/github.com/google/pprof/profile/encode.go
parent1e245d21b8ec0a4afb459b6f146cbc0c47f5cb24 (diff)
downloadgo-4d2855b55d8feb56eebc1fffb82c26b2ffc937b4.tar.xz
cmd/pprof: update vendored github.com/google/pprof
Pull in the latest published version of github.com/google/pprof as part of the continuous process of keeping Go's dependencies up to date. Done with: go get github.com/google/pprof go mod tidy go mod vendor For #36905. Change-Id: I2a48e912712bc916c9d749acb1550682f919477e Reviewed-on: https://go-review.googlesource.com/c/go/+/519657 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/profile/encode.go')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/profile/encode.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/profile/encode.go b/src/cmd/vendor/github.com/google/pprof/profile/encode.go
index c8a1beb8a8..182c926b90 100644
--- a/src/cmd/vendor/github.com/google/pprof/profile/encode.go
+++ b/src/cmd/vendor/github.com/google/pprof/profile/encode.go
@@ -258,10 +258,10 @@ func (p *Profile) postDecode() error {
// If this a main linux kernel mapping with a relocation symbol suffix
// ("[kernel.kallsyms]_text"), extract said suffix.
// It is fairly hacky to handle at this level, but the alternatives appear even worse.
- if strings.HasPrefix(m.File, "[kernel.kallsyms]") {
- m.KernelRelocationSymbol = strings.ReplaceAll(m.File, "[kernel.kallsyms]", "")
+ const prefix = "[kernel.kallsyms]"
+ if strings.HasPrefix(m.File, prefix) {
+ m.KernelRelocationSymbol = m.File[len(prefix):]
}
-
}
functions := make(map[uint64]*Function, len(p.Function))