1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:54:42 -07:00

runtime: give an explicit name to profiling Bucket sub-structs.

Fixes compilation of runtime on Solaris where the inner struct
was not called "_4_".

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/129460043
This commit is contained in:
Rémy Oudompheng 2014-08-21 22:34:00 +02:00
parent 5e70140521
commit a9cef4952f
2 changed files with 3 additions and 3 deletions

View File

@ -122,7 +122,7 @@ func BlockProfile(p []BlockProfileRecord) (n int, ok bool) {
ok = true
idx := 0
for b := bbuckets; b != nil; b = b.allnext {
bp := (*_4_)(unsafe.Pointer(&b.data))
bp := (*bprofrecord)(unsafe.Pointer(&b.data))
p[idx].Count = int64(bp.count)
p[idx].Cycles = int64(bp.cycles)
i := 0

View File

@ -13,7 +13,7 @@ struct Bucket
// this one is fine because it does not contain pointers.
union
{
struct // typ == MProf
struct MProfRecord // typ == MProf
{
// The following complex 3-stage scheme of stats accumulation
// is required to obtain a consistent picture of mallocs and frees
@ -43,7 +43,7 @@ struct Bucket
uintptr recent_free_bytes;
} mp;
struct // typ == BProf
struct BProfRecord // typ == BProf
{
int64 count;
int64 cycles;