ソースを参照

Add links to perf_data_converter

Raul Silvera 8 年 前
コミット
67eb6a604a
共有2 個のファイルを変更した8 個の追加1 個の削除を含む
  1. 7
    0
      README.md
  2. 1
    1
      internal/driver/fetch.go

+ 7
- 0
README.md ファイルの表示

@@ -70,6 +70,13 @@ This will open a simple shell that takes pprof commands to generate reports.
70 70
 Type 'help' for available commands/options.
71 71
 ```
72 72
 
73
+## Using pprof with Linux Perf
74
+
75
+pprof can read `perf.data` files generated by the
76
+[Linux perf](https://perf.wiki.kernel.org/index.php) tool by using the
77
+`perf_to_profile` program from the
78
+(perf\_data\_converter)[http://github.com/google/perf\_data\_converter] package.
79
+
73 80
 ## Further documentation
74 81
 
75 82
 See doc/pprof.md for more detailed end-user documentation.

+ 1
- 1
internal/driver/fetch.go ファイルの表示

@@ -417,7 +417,7 @@ func convertPerfData(perfPath string, ui plugin.UI) (*os.File, error) {
417 417
 	cmd := exec.Command("perf_to_profile", perfPath, profile.Name())
418 418
 	if err := cmd.Run(); err != nil {
419 419
 		profile.Close()
420
-		return nil, err
420
+		return nil, fmt.Errorf("failed to convert perf.data file. Try github.com/google/perf_data_converter: %v", err)
421 421
 	}
422 422
 	return profile, nil
423 423
 }