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
cmd/compile: decide how to better document -wb write barrier flag #36597
Comments
-wb=false
I think, in general, compiler flags should only be used if you know what you're doing. I don't think the help text could explain what disabling write barriers could do in a sentence or two, so the current line seems OK to me. |
That being said, I agree that a blog post would be interesting. But I don't know if this flag is something we want to encourage developers to use. |
Totally agree. And to understand what I'm doing I need a source of information.
I believe it should be described on the bottom of the documentation page of
Well, for example |
I don't think we want to document this flag. It's not intended for the end user. Its mere existence is an accident of history, when we were moving from a non-write-barrier GC to a write-barrier GC we needed a way to turn the write barrier on/off for testing. Maybe we should just remove it. |
I have use cases where I don't need GC at all, but I need to reduce the size of a binary.
I see. Thank you :) |
Agreed. |
-wb=false
Is the consensus that the flag should be removed? I could take a stab and prepare a PR for this. |
@tpaschalis There is no consensus yet (hence the "NeedsDecision" label). |
Moving to backlog milestone. |
Change https://golang.org/cl/244961 mentions this issue: |
Cherry asked the flag not to be removed, so I'd say the options now are 1) do nothing 2) document it better. Changing the title accordingly. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Opened
go tool compile
documentationWhat did you expect to see?
Description of option
-wb=false
. As user of this tool, I need to understand what do I loose when I use this option and what risks I get. I see that the size of a binary could be reduced (through using this option), but I cannot make a decision if it is justified to use this option in my case, because I don't know about other possible effects.The only information I found (before looking to the source code):
plus
plus
Some blogs which explains how this barrier works. But no explanation what will happen if I will disable it on Go1.13.
What did you see instead?
There's no description of the option.
The text was updated successfully, but these errors were encountered: