-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: cpu sample has wrong descripting comment in the code #58327
Comments
Hi @rhysh, seems like you added cpu samples to traces, could you take a look at this issue? |
After some investigation, looks like we have the stack id in the cpu sample, but the comment to the mentioned line is invalid - actually stack id is last, so the comment should look like: EvCPUSample = 49 // CPU profiling sample [timestamp, real timestamp, real P id (-1 when absent), goroutine id, stack] |
Change https://go.dev/cl/465335 mentions this issue: |
Thanks for sending a patch. In the future you don't need to file an issue about internal code comments, feel free to just send the PR. If you want to double-check your understanding, we'll hash it out in the review. If you have questions about the implementation in general, a good place to send a message https://groups.google.com/g/golang-dev. (There's nothing inherently wrong with filing an issue, but I think it ends up being more work for you in the end and doesn't really serve the Go maintainers either.) |
Fixes golang#58327 Change-Id: I15593e6ee42e04f2de13804ef26e0e66a2307db0 GitHub-Last-Rev: 7e0d04b GitHub-Pull-Request: golang#58338 Reviewed-on: https://go-review.googlesource.com/c/go/+/465335 Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, I got the same result with go 1.20.
What did you do?
I have program:
The program provides a trace file as output.
What did you expect to see?
I expect Cpu samples in the trace file will be in the format (as in the source code of trace tool):
I.e. stack is second, real timestamp is third.
What did you see instead?
Instead, I see the following events in the trace file:
So seems like real timestamp is on the second position, but more essential there is no stack id!
The text was updated successfully, but these errors were encountered: