diff options
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver')
3 files changed, 4 insertions, 10 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go index f4248fd8c7..c2b1cd082b 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go @@ -138,7 +138,7 @@ func generateReport(p *profile.Profile, cmd []string, vars variables, o *plugin. // Output to specified file. o.UI.PrintErr("Generating report in ", output) - out, err := o.Writer.Open(output) + out, err := os.Create(output) if err != nil { return err } 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 ec2745f363..2b1d90dafd 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 @@ -534,8 +534,7 @@ func convertPerfData(perfPath string, ui plugin.UI) (*os.File, error) { return nil, err } deferDeleteTempFile(profile.Name()) - cmd := exec.Command("perf_to_profile", "-i", perfPath, "-o", profile.Name(), "-f") - cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr + cmd := exec.Command("perf_to_profile", perfPath, profile.Name()) if err := cmd.Run(); err != nil { profile.Close() return nil, fmt.Errorf("failed to convert perf.data file. Try github.com/google/perf_data_converter: %v", err) diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go index bebfbbec1e..b893697b62 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go @@ -149,14 +149,9 @@ func greetings(p *profile.Profile, ui plugin.UI) { numLabelUnits := identifyNumLabelUnits(p, ui) ropt, err := reportOptions(p, numLabelUnits, pprofVariables) if err == nil { - rpt := report.New(p, ropt) - ui.Print(strings.Join(report.ProfileLabels(rpt), "\n")) - if rpt.Total() == 0 && len(p.SampleType) > 1 { - ui.Print(`No samples were found with the default sample value type.`) - ui.Print(`Try "sample_index" command to analyze different sample values.`, "\n") - } + ui.Print(strings.Join(report.ProfileLabels(report.New(p, ropt)), "\n")) } - ui.Print(`Entering interactive mode (type "help" for commands, "o" for options)`) + ui.Print("Entering interactive mode (type \"help\" for commands, \"o\" for options)") } // shortcuts represents composite commands that expand into a sequence |
