diff options
Diffstat (limited to 'src/runtime/mprof.go')
| -rw-r--r-- | src/runtime/mprof.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/mprof.go b/src/runtime/mprof.go index 6435c0446a..7f9b6671f7 100644 --- a/src/runtime/mprof.go +++ b/src/runtime/mprof.go @@ -100,7 +100,7 @@ func newBucket(typ bucketType, nstk int) *bucket { size := unsafe.Sizeof(bucket{}) + uintptr(nstk)*unsafe.Sizeof(uintptr(0)) switch typ { default: - gothrow("invalid profile bucket type") + throw("invalid profile bucket type") case memProfile: size += unsafe.Sizeof(memRecord{}) case blockProfile: @@ -123,7 +123,7 @@ func (b *bucket) stk() []uintptr { // mp returns the memRecord associated with the memProfile bucket b. func (b *bucket) mp() *memRecord { if b.typ != memProfile { - gothrow("bad use of bucket.mp") + throw("bad use of bucket.mp") } data := add(unsafe.Pointer(b), unsafe.Sizeof(*b)+b.nstk*unsafe.Sizeof(uintptr(0))) return (*memRecord)(data) @@ -132,7 +132,7 @@ func (b *bucket) mp() *memRecord { // bp returns the blockRecord associated with the blockProfile bucket b. func (b *bucket) bp() *blockRecord { if b.typ != blockProfile { - gothrow("bad use of bucket.bp") + throw("bad use of bucket.bp") } data := add(unsafe.Pointer(b), unsafe.Sizeof(*b)+b.nstk*unsafe.Sizeof(uintptr(0))) return (*blockRecord)(data) @@ -143,7 +143,7 @@ func stkbucket(typ bucketType, size uintptr, stk []uintptr, alloc bool) *bucket if buckhash == nil { buckhash = (*[buckHashSize]*bucket)(sysAlloc(unsafe.Sizeof(*buckhash), &memstats.buckhash_sys)) if buckhash == nil { - gothrow("runtime: cannot allocate memory") + throw("runtime: cannot allocate memory") } } |
