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

profile: How to profile a go program base on wall time instead of cpu time? #28203

Closed
ppggff opened this issue Oct 15, 2018 · 2 comments
Closed

Comments

@ppggff
Copy link

ppggff commented Oct 15, 2018

As I know, go profile use SIGPROF to sample call stacks N times per second in cpu time.
It will ignore idle time, waiting time since these time doesn't consume cpu.

To profile a go program with mix load, I want to profile it base on wall time: samples
call stacks N times per second in wall time. And it will show the result in same UI of cpu time.

For example, poor man's profiler (https://poormansprofiler.org/) sampling program by running gdb per second(or minute).

How to do it with current go prof? or some others tools?

@ianlancetaylor
Copy link
Contributor

I don't think there is a way.

Note that we don't use the issue tracker for questions. See https://golang.org/wiki/Questions . I'm going to close this issue report because there is no clear way to fix it.

@ppggff
Copy link
Author

ppggff commented Oct 15, 2018

Thanks. I created a topic at Go Forum: https://forum.golangbridge.org/t/profile-how-to-profile-a-go-program-base-on-wall-time-instead-of-cpu-time/10990

And I am trying to make it work by:

  • Set cpu sample rate to 1Hz
  • Start a time ticker (100Hz) to send SIGPROF to self

@golang golang locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants