Browse Source

Merge pull request #35 from rauls5382/master

Add links to perf_data_converter
Hyoun Kyu Cho 8 years ago
parent
commit
dd395a642d
2 changed files with 8 additions and 1 deletions
  1. 7
    0
      README.md
  2. 1
    1
      internal/driver/fetch.go

+ 7
- 0
README.md View File

70
 Type 'help' for available commands/options.
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
 ## Further documentation
80
 ## Further documentation
74
 
81
 
75
 See doc/pprof.md for more detailed end-user documentation.
82
 See doc/pprof.md for more detailed end-user documentation.

+ 1
- 1
internal/driver/fetch.go View File

417
 	cmd := exec.Command("perf_to_profile", perfPath, profile.Name())
417
 	cmd := exec.Command("perf_to_profile", perfPath, profile.Name())
418
 	if err := cmd.Run(); err != nil {
418
 	if err := cmd.Run(); err != nil {
419
 		profile.Close()
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
 	return profile, nil
422
 	return profile, nil
423
 }
423
 }