commit | 0dfb0513ec6a0e97db166bd91a2dc0a1ceb154f7 | [log] [tgz] |
---|---|---|
author | Michael Pratt <mpratt@google.com> | Tue Apr 07 12:12:44 2020 -0400 |
committer | Michael Pratt <mpratt@google.com> | Wed Apr 08 14:51:58 2020 +0000 |
tree | 46eef9a3ef3767e4b7d1c54b18beb7415b5daede | |
parent | 08dd4ad7e30313d089793f19baff1855bbaa004e [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. Change-Id: I62522a9ded5544b06d1bf28550af5400f3af667b Reviewed-on: https://go-review.googlesource.com/c/go/+/227484 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.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.