From 4d2855b55d8feb56eebc1fffb82c26b2ffc937b4 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Tue, 15 Aug 2023 11:45:57 -0400 Subject: 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 TryBot-Result: Gopher Robot Reviewed-by: Russ Cox LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov Run-TryBot: Dmitri Shuralyov --- .../github.com/google/pprof/internal/driver/cli.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go') diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go index a9cae92d1b..b97ef85169 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go @@ -18,7 +18,6 @@ import ( "errors" "fmt" "os" - "strings" "github.com/google/pprof/internal/binutils" "github.com/google/pprof/internal/plugin" @@ -67,7 +66,7 @@ func parseFlags(o *plugin.Options) (*source, []string, error) { flagTools := flag.String("tools", os.Getenv("PPROF_TOOLS"), "Path for object tool pathnames") flagHTTP := flag.String("http", "", "Present interactive web UI at the specified http host:port") - flagNoBrowser := flag.Bool("no_browser", false, "Skip opening a browswer for the interactive web UI") + flagNoBrowser := flag.Bool("no_browser", false, "Skip opening a browser for the interactive web UI") // Flags that set configuration properties. cfg := currentConfig() @@ -102,9 +101,6 @@ func parseFlags(o *plugin.Options) (*source, []string, error) { file.Close() execName = arg0 args = args[1:] - } else if *flagBuildID == "" && isBuildID(arg0) { - *flagBuildID = arg0 - args = args[1:] } } @@ -265,12 +261,6 @@ func installConfigFlags(flag plugin.FlagSet, cfg *config) func() error { } } -// isBuildID determines if the profile may contain a build ID, by -// checking that it is a string of hex digits. -func isBuildID(id string) bool { - return strings.Trim(id, "0123456789abcdefABCDEF") == "" -} - func sampleIndex(flag *bool, si string, sampleType, option string, ui plugin.UI) string { if *flag { if si == "" { @@ -364,5 +354,7 @@ var usageMsgVars = "\n\n" + " PPROF_BINARY_PATH Search path for local binary files\n" + " default: $HOME/pprof/binaries\n" + " searches $buildid/$name, $buildid/*, $path/$buildid,\n" + - " ${buildid:0:2}/${buildid:2}.debug, $name, $path\n" + + " ${buildid:0:2}/${buildid:2}.debug, $name, $path,\n" + + " ${name}.debug, $dir/.debug/${name}.debug,\n" + + " usr/lib/debug/$dir/${name}.debug\n" + " * On Windows, %USERPROFILE% is used instead of $HOME" -- cgit v1.3-6-g1900