aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go16
1 files changed, 4 insertions, 12 deletions
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"