aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/internal/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/driver/cli.go7
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go5
2 files changed, 11 insertions, 1 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 b97ef85169..7b8c3fc607 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
@@ -37,6 +37,7 @@ type source struct {
HTTPHostport string
HTTPDisableBrowser bool
Comment string
+ AllFrames bool
}
// parseFlags parses the command lines through the specified flags package
@@ -51,7 +52,8 @@ func parseFlags(o *plugin.Options) (*source, []string, error) {
flagSymbolize := flag.String("symbolize", "", "Options for profile symbolization")
flagBuildID := flag.String("buildid", "", "Override build id for first mapping")
flagTimeout := flag.Int("timeout", -1, "Timeout in seconds for fetching a profile")
- flagAddComment := flag.String("add_comment", "", "Annotation string to record in the profile")
+ flagAddComment := flag.String("add_comment", "", "Free-form annotation to add to the profile")
+ flagAllFrames := flag.Bool("all_frames", false, "Ignore drop_frames and keep_frames regexps")
// CPU profile options
flagSeconds := flag.Int("seconds", -1, "Length of time for dynamic profiles")
// Heap profile options
@@ -145,6 +147,7 @@ func parseFlags(o *plugin.Options) (*source, []string, error) {
HTTPHostport: *flagHTTP,
HTTPDisableBrowser: *flagNoBrowser,
Comment: *flagAddComment,
+ AllFrames: *flagAllFrames,
}
if err := source.addBaseProfiles(*flagBase, *flagDiffBase); err != nil {
@@ -338,6 +341,8 @@ var usageMsgVars = "\n\n" +
" Port is optional and a randomly available port by default.\n" +
" -no_browser Skip opening a browser for the interactive web UI.\n" +
" -tools Search path for object tools\n" +
+ " -all_frames Ignore drop_frames and keep_frames regexps in the profile\n" +
+ " Rarely needed, mainly used for debugging pprof itself\n" +
"\n" +
" Legacy convenience options:\n" +
" -inuse_space Same as -sample_index=inuse_space\n" +
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go
index 969c1dac11..6d967a2037 100644
--- a/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go
+++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go
@@ -77,6 +77,11 @@ func fetchProfiles(s *source, o *plugin.Options) (*profile.Profile, error) {
}
}
+ if s.AllFrames {
+ p.DropFrames = ""
+ p.KeepFrames = ""
+ }
+
// Symbolize the merged profile.
if err := o.Sym.Symbolize(s.Symbolize, m, p); err != nil {
return nil, err