Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/pprof: provide method to dump cpu profile as plain text #40204

Open
cch123 opened this issue Jul 14, 2020 · 1 comment
Open

runtime/pprof: provide method to dump cpu profile as plain text #40204

cch123 opened this issue Jul 14, 2020 · 1 comment

Comments

@cch123
Copy link
Contributor

@cch123 cch123 commented Jul 14, 2020

What version of Go are you using (go version)?

$ go version
go version go1.13.12 darwin/amd64

Does this issue reproduce with the latest release?

Y

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

use runtime/pprof to dump cpu/mem/goroutine profile.

What did you expect to see?

All types of profiles should have plain text output, eg

I can write memory or any other profile as plain text:

pprof.Lookup("heap").WriteTo(&buf, 1) 

But it's really hard to get a plain text CPU profile, especially when there is no executable go or pprof binary and no internet connection.

What did you see instead?

There is no way to dump cpu profile directly in plain text.

@cch123 cch123 changed the title runtime/pprof: provide method to write cpu profile as plain text runtime/pprof: provide method to dump cpu profile as plain text Jul 14, 2020
@andybons
Copy link
Member

@andybons andybons commented Jul 14, 2020

@andybons andybons added this to the Unplanned milestone Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.