3d741349f5
If we use -gcflags='-m -m', the compiler should give us a reason why a func couldn't be inlined. Add the extra -m necessary for that extra info and use it to give better test failures. For example, for the func in the TODO: --- FAIL: TestIntendedInlining (1.53s) inl_test.go:104: runtime.nextFreeFast was not inlined: function too complex We might increase the number of -m flags to get more information at some later point, such as getting details on how close the func was to the inlining budget. Also started using regexes, as the output parsing is getting a bit too complex for manual string handling. While at it, also refactored the test to not buffer the entire output into memory. This is fine in practice, but it won't scale well as we add more packages or we depend more on the compiler's debugging output. For example, "go build -a -gcflags='-m -m' std" prints nearly 40MB of plaintext - and we only need to see the output line by line anyway. Updates #21851. Change-Id: I00986ff360eb56e4e9737b65a6be749ef8540643 Reviewed-on: https://go-review.googlesource.com/63810 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
favicon.ico | ||
LICENSE | ||
PATENTS | ||
README.md | ||
robots.txt |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Contributing
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project does not use GitHub pull requests, and that we use the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.