mirror of
https://github.com/golang/go.git
synced 2026-06-28 03:40:37 +00:00
cmd/trace: fix off-by-one bug
Change-Id: I45e212dc8038895aa6076f98a450803d52ba3fa6
GitHub-Last-Rev: c7fb35127b
GitHub-Pull-Request: golang/go#78924
Reviewed-on: https://go-review.googlesource.com/c/go/+/770120
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
parent
9a32e8ce07
commit
33cf6926ec
1 changed files with 1 additions and 1 deletions
|
|
@ -305,12 +305,12 @@ func (m *stackMap) profile() []traceviewer.ProfileRecord {
|
|||
var i int
|
||||
for frame := range stack.Frames() {
|
||||
rec.Stack = append(rec.Stack, frame)
|
||||
i++
|
||||
// Cut this off at pprofMaxStack because that's as far
|
||||
// as our deduplication goes.
|
||||
if i >= pprofMaxStack {
|
||||
break
|
||||
}
|
||||
i++
|
||||
}
|
||||
prof = append(prof, rec)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue