From: Matthew Dempsky Date: Mon, 22 Feb 2016 19:27:32 +0000 (-0800) Subject: runtime: simplify stack copying in ThreadCreateProfile X-Git-Tag: go1.7beta1~1779 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=756ea30eb05357b02af1ac512920ed647d4ee350;p=gostls13.git runtime: simplify stack copying in ThreadCreateProfile Change-Id: I7414d2fab18ae6e7e7c50f8697ec64d38290f409 Reviewed-on: https://go-review.googlesource.com/19817 Run-TryBot: Matthew Dempsky TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/mprof.go b/src/runtime/mprof.go index fc73bbfbe1..3efa375d6a 100644 --- a/src/runtime/mprof.go +++ b/src/runtime/mprof.go @@ -506,9 +506,7 @@ func ThreadCreateProfile(p []StackRecord) (n int, ok bool) { ok = true i := 0 for mp := first; mp != nil; mp = mp.alllink { - for s := range mp.createstack { - p[i].Stack0[s] = uintptr(mp.createstack[s]) - } + p[i].Stack0 = mp.createstack i++ } }