diff options
| author | Dmitri Shuralyov <dmitshur@golang.org> | 2025-12-01 11:29:26 -0500 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-12-01 09:15:40 -0800 |
| commit | 4be545115cf8ed42aa0337cbb6c3a92f718192b9 (patch) | |
| tree | dd7495ce97f9d540edc8c71d762d9b8d5c6f0062 /src/cmd/vendor/github.com/google/pprof/internal/driver | |
| parent | 16c0f7e1524c40521312e485b0b0f8b26c95b174 (diff) | |
| download | go-4be545115cf8ed42aa0337cbb6c3a92f718192b9.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.
For #36905.
[git-generate]
cd src/cmd
go get github.com/google/pprof@v0.0.0-20251114195745-4902fdda35c8
go mod tidy
go mod vendor
Change-Id: Id26eb632f637fb2c602d87cb83fdff7f099934ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/725500
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver')
3 files changed, 14 insertions, 12 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/config.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/config.go index 184de397ef..20d169c8f6 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/config.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/config.go @@ -164,7 +164,7 @@ func init() { def := defaultConfig() configFieldMap = map[string]configField{} - t := reflect.TypeOf(config{}) + t := reflect.TypeFor[config]() for i, n := 0, t.NumField(); i < n; i++ { field := t.Field(i) js := strings.Split(field.Tag.Get("json"), ",") diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/html/header.html b/src/cmd/vendor/github.com/google/pprof/internal/driver/html/header.html index 5405a0be95..4d0f198a69 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/html/header.html +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/html/header.html @@ -10,7 +10,7 @@ </div> <div class="submenu"> <a title="{{.Help.top}}" href="./top" id="topbtn">Top</a> - <a title="{{.Help.graph}}" href="./" id="graphbtn">Graph</a> + <a title="{{.Help.graph}}" href="./graph" id="graphbtn">Graph</a> <a title="{{.Help.flamegraph}}" href="./flamegraph" id="flamegraph">Flame Graph</a> <a title="{{.Help.peek}}" href="./peek" id="peek">Peek</a> <a title="{{.Help.list}}" href="./source" id="list">Source</a> diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go index ac7465c93e..568a5cb99a 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go @@ -125,21 +125,23 @@ func serveWebInterface(hostport string, p *profile.Profile, o *plugin.Options, d Host: host, Port: port, Handlers: map[string]http.Handler{ - "/": http.HandlerFunc(ui.dot), - "/top": http.HandlerFunc(ui.top), - "/disasm": http.HandlerFunc(ui.disasm), - "/source": http.HandlerFunc(ui.source), - "/peek": http.HandlerFunc(ui.peek), - "/flamegraph": http.HandlerFunc(ui.stackView), - "/flamegraph2": redirectWithQuery("flamegraph", http.StatusMovedPermanently), // Keep legacy URL working. - "/flamegraphold": redirectWithQuery("flamegraph", http.StatusMovedPermanently), // Keep legacy URL working. - "/saveconfig": http.HandlerFunc(ui.saveConfig), - "/deleteconfig": http.HandlerFunc(ui.deleteConfig), + "/": redirectWithQuery("flamegraph", http.StatusMovedPermanently), + "/graph": http.HandlerFunc(ui.dot), + "/top": http.HandlerFunc(ui.top), + "/disasm": http.HandlerFunc(ui.disasm), + "/source": http.HandlerFunc(ui.source), + "/peek": http.HandlerFunc(ui.peek), + "/flamegraph": http.HandlerFunc(ui.stackView), + "/saveconfig": http.HandlerFunc(ui.saveConfig), + "/deleteconfig": http.HandlerFunc(ui.deleteConfig), "/download": http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.Header().Set("Content-Type", "application/vnd.google.protobuf+gzip") w.Header().Set("Content-Disposition", "attachment;filename=profile.pb.gz") p.Write(w) }), + // Keep legacy URLs working. + "/flamegraph2": redirectWithQuery("flamegraph", http.StatusMovedPermanently), + "/flamegraphold": redirectWithQuery("flamegraph", http.StatusMovedPermanently), }, } |
