commit | 796475ce1f7c4be3b7171cacea225cc313083c6d | [log] [tgz] |
---|---|---|
author | Michael Pratt <mpratt@google.com> | Tue Apr 07 12:12:44 2020 -0400 |
committer | Michael Pratt <mpratt@google.com> | Mon Apr 13 20:37:04 2020 +0000 |
tree | c6098adfc9b0dc7af7f2023c887e81e2a4fd9a91 | |
parent | 6f3a9515b6bb879472f3b3443a052b07ed11ee2f [diff] |
runtime/pprof: try to use real stack in TestTryAdd TestTryAdd is particularly brittle because it tests some real cases by constructing fake sample stack frames. If those frames don't correctly represent what the runtime would generate then they may fail to catch regressions. Instead, call runtime.Callers at the bottom of real function calls to generate real frames as a base for truncation, etc in tests. Several of these tests still have to fake parts of the frames to test the right thing, but this is a bit less fragile. This change is equivalent to the original 0dfb0513ec6a0e97db166bd91a2dc0a1ceb154f7 (golang.org/cl/227484), except that the test skips if the test functions aren't inline (e.g., noopt builders). Change-Id: Ie9e32b5660cfe28a924f9cfcddcd887ea2effd66 Reviewed-on: https://go-review.googlesource.com/c/go/+/227922 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
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.
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.
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.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses 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.