go icon indicating copy to clipboard operation
go copied to clipboard

cmd/compile/internal/pgo: fix hard-coded PGO sample data position

Open brancz opened this issue 2 years ago • 11 comments

This patch detects at which index position profiling samples that have the value-type samples count are, instead of the previously hard-coded position of index 1. Runtime generated profiles always generate CPU profiling data with the 0 index being CPU nanoseconds, and samples count at index 1, which is why this previously hasn't come up.

Fixes #58292

brancz avatar Feb 03 '23 15:02 brancz

This PR (HEAD: 2cb3ce0e2017bdf49cc57a929284b2734125917a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/465135 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Feb 03 '23 15:02 gopherbot

Happy to add a test of course, but wanted to discuss what you would prefer that to look like. Should I edit the existing test and modify the generated pprof and put the samples count on index 0? An additional test? Or is it small enough that you don't care?

brancz avatar Feb 03 '23 15:02 brancz

Message from Gopher Robot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps: A maintainer will review your change and provide feedback. See https://go.dev/doc/contribute#review for more info and tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be surprising to people new to the project. The careful, iterative review process is our way of helping mentor contributors and ensuring that their contributions have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which little code gets reviewed or merged. If a reviewer responds with a comment like R=go1.11 or adds a tag like "wait-release", it means that this CL will be reviewed as part of the next development cycle. See https://go.dev/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 15:02 gopherbot

Message from Michael Pratt:

Patch Set 1: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 15:02 gopherbot

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 15:02 gopherbot

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 16:02 gopherbot

Message from Gopher Robot:

Patch Set 1: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 16:02 gopherbot

Message from Michael Pratt:

Patch Set 1: Code-Review+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 16:02 gopherbot

This PR (HEAD: 9bf83e600d9edb1211d0725e83013c4c520d6fe7) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/465135 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Feb 03 '23 16:02 gopherbot

Message from Frederic Branczyk:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 17:02 gopherbot

Message from Cherry Mui:

Patch Set 1: Code-Review+2

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 17:02 gopherbot

Message from Michael Pratt:

Patch Set 2: Code-Review+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 03 '23 21:02 gopherbot

This PR (HEAD: 302d47f1be8355582d2db5117720a9d6642a8b95) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/465135 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Feb 04 '23 09:02 gopherbot

Message from Frederic Branczyk:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 04 '23 09:02 gopherbot

Message from Austin Clements:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 07 '23 17:02 gopherbot

This PR (HEAD: 157ffb990aca59d3d949666514a63de00cc18dcb) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/465135 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Feb 08 '23 02:02 gopherbot

Message from Frederic Branczyk:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 02:02 gopherbot

Message from Michael Pratt:

Patch Set 4: Code-Review+2 Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 17:02 gopherbot

Message from Gopher Robot:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 17:02 gopherbot

Message from Gopher Robot:

Patch Set 4: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 17:02 gopherbot

Message from David Chase:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 17:02 gopherbot

This PR (HEAD: dabbf9f88c560286e150e9b136a27c3ac23c5ec1) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/465135 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off) See the Wiki page for more info

gopherbot avatar Feb 08 '23 17:02 gopherbot

Message from Frederic Branczyk:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 18:02 gopherbot

Message from Michael Pratt:

Patch Set 5: Auto-Submit+1 Code-Review+2 Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 18:02 gopherbot

Message from Gopher Robot:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/465135. After addressing review feedback, remember to publish your drafts!

gopherbot avatar Feb 08 '23 18:02 gopherbot

This PR is being closed because golang.org/cl/465135 has been merged.

gopherbot avatar Feb 08 '23 18:02 gopherbot