aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/internal/driver
diff options
context:
space:
mode:
authorHyang-Ah Hana Kim <hyangah@gmail.com>2018-03-23 15:00:34 +0000
committerHyang-Ah Hana Kim <hyangah@gmail.com>2018-03-23 15:09:04 +0000
commit58734039bdddbdfd3c7cd4f9fc232a75f5cef32a (patch)
treed460c5fe378acf8139ea9f7179ffe94156e88e7c /src/cmd/vendor/github.com/google/pprof/internal/driver
parentc6e69ec7f930191022f1369761a680eecc2e89f1 (diff)
downloadgo-58734039bdddbdfd3c7cd4f9fc232a75f5cef32a.tar.xz
Revert "cmd/vendor/.../pprof: refresh from upstream@a74ae6f"
This reverts commit c6e69ec7f930191022f1369761a680eecc2e89f1. Reason for revert: Broke builders. #24508 Change-Id: I66abff0dd14ec6e1f8d8d982ccfb0438633b639d Reviewed-on: https://go-review.googlesource.com/102316 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go2
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go3
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go9
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