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: sample large heap allocations correctly #29791

Closed
wants to merge 3 commits into from

Conversation

rauls5382
Copy link
Contributor

@rauls5382 rauls5382 commented Jan 17, 2019

Remove an unnecessary check on the heap sampling code that forced sampling
of all heap allocations larger than the sampling rate. This need to follow
a poisson process so that they can be correctly unsampled. Maintain a check
for MemProfileRate==1 to provide a mechanism for full sampling, as
documented in https://golang.org/pkg/runtime/#pkg-variables.

Additional testing for this change is on cl/129117.

Fixes #26618

Remove an unnecessary check on the heap sampling code that forced sampling
of all heap allocations larger than the sampling rate. This need to follow
a poisson process so that they can be correctly unsampled. Maintain a check
for MemProfileRate==1 to provide a mechanism for full sampling, as
documented in https://golang.org/pkg/runtime/#pkg-variables.

Additional testing for this change is on cl/129117.

Fixes golang#26618
@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Jan 17, 2019
@gopherbot
Copy link

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

Please visit https://go-review.googlesource.com/c/go/+/158337 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
Copy link

Message from Raul Silvera:

Patch Set 1:

This is the one-line branch off cl/129117, for your consideration for 1.12


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

@gopherbot
Copy link

Message from Austin Clements:

Patch Set 2: Commit message was updated.


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

@gopherbot
Copy link

Message from Hyang-Ah Hana Kim:

Patch Set 3: Run-TryBot+1 Code-Review+1


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 3:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=e0c40659


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

@gopherbot
Copy link

Message from Austin Clements:

Patch Set 3:

Bad GerritBot!

Raul, can you update the PR to remove the instructions from the commit message? I tried to, but GerritBot just put it back. Otherwise this change LGTM.


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 3:

Build is still in progress...
This change failed on linux-amd64:
See https://storage.googleapis.com/go-build-log/e0c40659/linux-amd64_ebeaba01.log

Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 3: TryBot-Result-1

6 of 19 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/e0c40659/linux-amd64_ebeaba01.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/e0c40659/linux-386_0761ee2f.log
Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/e0c40659/freebsd-amd64-12_0_75dd3f43.log
Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/e0c40659/windows-386-2008_0cf1f445.log
Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/e0c40659/linux-amd64-race_8d730eb2.log
Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/e0c40659/openbsd-amd64-64_6fbc46cc.log

Consult https://build.golang.org/ to see whether they are new failures.


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

@gopherbot
Copy link

Message from Raul Silvera:

Patch Set 4: Commit message was updated.


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

@gopherbot
Copy link

Message from Hyang-Ah Hana Kim:

Patch Set 5:

Patch Set 3: TryBot-Result-1

6 of 19 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/e0c40659/linux-amd64_ebeaba01.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/e0c40659/linux-386_0761ee2f.log
Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/e0c40659/freebsd-amd64-12_0_75dd3f43.log
Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/e0c40659/windows-386-2008_0cf1f445.log
Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/e0c40659/linux-amd64-race_8d730eb2.log
Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/e0c40659/openbsd-amd64-64_6fbc46cc.log

Consult https://build.golang.org/ to see whether they are new failures.

It seems like a real failure - maybe for the test we should make sure we set the profile rate to 1. Large memory allocation sampling is no longer deterministic.


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

@gopherbot
Copy link

Message from Austin Clements:

Patch Set 5:

Okay, the issue with the commit message is golang.org/issue/25359.

Raul, could you try editing your PR's description, rather than the commit message itself? E.g., edit the first message under the "Conversation" at #29791.


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

@gopherbot
Copy link

Message from Austin Clements:

Patch Set 6: Run-TryBot+1


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 6:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=0dee4dea


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 6:

Build is still in progress...
This change failed on linux-amd64:
See https://storage.googleapis.com/go-build-log/0dee4dea/linux-amd64_c0d395c8.log

Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 6: TryBot-Result-1

6 of 19 TryBots failed:
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/0dee4dea/linux-amd64_c0d395c8.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/0dee4dea/linux-386_94dfc8a9.log
Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/0dee4dea/freebsd-amd64-12_0_72e0aa0c.log
Failed on windows-amd64-2016: https://storage.googleapis.com/go-build-log/0dee4dea/windows-amd64-2016_9a29ba39.log
Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/0dee4dea/linux-amd64-race_f14b9b63.log
Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/0dee4dea/openbsd-amd64-64_56c9487e.log

Consult https://build.golang.org/ to see whether they are new failures.


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

@gopherbot
Copy link

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

Please visit https://go-review.googlesource.com/c/go/+/158337 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
Copy link

Message from Austin Clements:

Patch Set 7:

(1 comment)


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

Also reduce the number of allocations in this testcase, as it no
longer requires many allocations to trigger sampling.
@gopherbot
Copy link

Message from Raul Silvera:

Patch Set 7:

(1 comment)

Patch Set 7:

(1 comment)


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

@gopherbot
Copy link

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

Please visit https://go-review.googlesource.com/c/go/+/158337 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
Copy link

Message from Austin Clements:

Patch Set 8: Run-TryBot+1

I see. Thanks!


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 8:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=a5e96756


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

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 8: TryBot-Result+1

TryBots are happy.


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

@gopherbot
Copy link

Message from Hyang-Ah Hana Kim:

Patch Set 8: Code-Review+2


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

gopherbot pushed a commit that referenced this pull request Jan 18, 2019
Remove an unnecessary check on the heap sampling code that forced sampling
of all heap allocations larger than the sampling rate. This need to follow
a poisson process so that they can be correctly unsampled. Maintain a check
for MemProfileRate==1 to provide a mechanism for full sampling, as
documented in https://golang.org/pkg/runtime/#pkg-variables.

Additional testing for this change is on cl/129117.

Fixes #26618

Change-Id: I7802bde2afc655cf42cffac34af9bafeb3361957
GitHub-Last-Rev: 471f747
GitHub-Pull-Request: #29791
Reviewed-on: https://go-review.googlesource.com/c/158337
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@gopherbot
Copy link

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

@gopherbot gopherbot closed this Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants