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
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@cch123
Copy link
Contributor

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

@hyangah

@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 14, 2020
@andybons andybons added this to the Unplanned milestone Jul 14, 2020
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants