Skip to content

Add --debug args to all subcommands of ctr pprof#7629

Merged
fuweid merged 1 commit intocontainerd:mainfrom
wzshiming:feat/pprof-debug
Nov 11, 2022
Merged

Add --debug args to all subcommands of ctr pprof#7629
fuweid merged 1 commit intocontainerd:mainfrom
wzshiming:feat/pprof-debug

Conversation

@wzshiming
Copy link
Copy Markdown
Contributor

@wzshiming wzshiming commented Nov 4, 2022

https://pkg.go.dev/runtime/pprof#pkg-notes

The debug parameter enables additional output.
Passing debug=0 writes the gzip-compressed protocol buffer described in https://github.com/google/pprof/tree/master/proto#overview.
Passing debug=1 writes the legacy text format with comments translating addresses to function names and line numbers, so that a programmer can read the profile without tools.

The predefined profiles may assign meaning to other debug values; for example, when printing the "goroutine" profile, 
debug=2 means to print the goroutine stacks in the same form that a Go program uses when dying due to an unrecovered panic.

I propose adding --debug parameter for friendly export of pprof data

@k8s-ci-robot
Copy link
Copy Markdown

Hi @wzshiming. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@wzshiming wzshiming changed the title Add --debug args to all subcommands of ctr pprof Add --debug args to all subcommands of ctr pprof Nov 4, 2022
@estesp
Copy link
Copy Markdown
Member

estesp commented Nov 7, 2022

Please sign your commit with your real name+email address to pass DCO checks

@wzshiming
Copy link
Copy Markdown
Contributor Author

done.

Comment thread cmd/ctr/commands/pprof/pprof.go Outdated
Signed-off-by: Shiming Zhang <[email protected]>
@wzshiming wzshiming requested a review from kzys November 9, 2022 09:44
@wzshiming
Copy link
Copy Markdown
Contributor Author

done

@fuweid fuweid merged commit 9fffa8c into containerd:main Nov 11, 2022
@wzshiming wzshiming deleted the feat/pprof-debug branch November 11, 2022 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants