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/trace, cmd/trace: include CPU profile samples #16895

Closed
rhysh opened this issue Aug 26, 2016 · 4 comments
Closed

runtime/trace, cmd/trace: include CPU profile samples #16895

rhysh opened this issue Aug 26, 2016 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rhysh
Copy link
Contributor

rhysh commented Aug 26, 2016

The trace viewer UI provides a mechanism for displaying CPU profile stack samples.

Access to that data inline with other execution trace data—seeing what functions are being executed by goroutines that run for a surprisingly long time—would have been very helpful for diagnosing bugs like #14812, #16293, and #16432. Though the time for those specific bugs may have passed, I think that Go and its users will encounter similar bugs in the future (either in the runtime or in user code).

@quentinmit quentinmit added this to the Go1.8Maybe milestone Sep 6, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 11, 2016
@rsc
Copy link
Contributor

rsc commented Nov 2, 2016

@aclements, this is what confused me!

@gopherbot
Copy link

Change https://go.dev/cl/400795 mentions this issue: runtime: add CPU samples to execution trace

gopherbot pushed a commit that referenced this issue May 3, 2022
When the CPU profiler and execution tracer are both active, report the
CPU profile samples in the execution trace data stream.

Include only samples that arrive on the threads known to the runtime,
but include them even when running g0 (such as near the scheduler) or if
there's no P (such as near syscalls).

Render them in "go tool trace" as instantaneous events.

For #16895

Change-Id: I0aa501a7b450c971e510961c0290838729033f7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/400795
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Rhys Hiltner <rhys@justin.tv>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
@aclements
Copy link
Member

@rhysh , should this issue be closed now? Your CL just said "For", but as far as I can tell, there's nothing more to do here. (Thank you so much for adding this!)

@rhysh
Copy link
Contributor Author

rhysh commented Aug 15, 2022

Yes! There are places to improve (some day), but those can get new issues.

@rhysh rhysh closed this as completed Aug 15, 2022
@golang golang locked and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants