diff options
| author | Keith Randall <khr@golang.org> | 2014-12-27 20:58:00 -0800 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2014-12-28 06:16:16 +0000 |
| commit | b2a950bb7343a46ff3edd8502fe2f02fc051a308 (patch) | |
| tree | 97511001e7aa590d22b1b0d8c962467319180681 /src/runtime/heapdump.go | |
| parent | ddef2d27fec52c271ee72911e60b07f5f62cf3cb (diff) | |
| download | go-b2a950bb7343a46ff3edd8502fe2f02fc051a308.tar.xz | |
runtime: rename gothrow to throw
Rename "gothrow" to "throw" now that the C version of "throw"
is no longer needed.
This change is purely mechanical except in panic.go where the
old version of "throw" has been deleted.
sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go
Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3
Reviewed-on: https://go-review.googlesource.com/2150
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/runtime/heapdump.go')
| -rw-r--r-- | src/runtime/heapdump.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go index 3983670456..5b219bb484 100644 --- a/src/runtime/heapdump.go +++ b/src/runtime/heapdump.go @@ -222,7 +222,7 @@ func dumpbv(cbv *bitvector, offset uintptr) { for i := uintptr(0); i < uintptr(bv.n); i += bitsPerPointer { switch bv.bytedata[i/8] >> (i % 8) & 3 { default: - gothrow("unexpected pointer bits") + throw("unexpected pointer bits") case _BitsDead: // BitsDead has already been processed in makeheapobjbv. // We should only see it in stack maps, in which case we should continue processing. @@ -392,7 +392,7 @@ func dumpgs() { switch status { default: print("runtime: unexpected G.status ", hex(status), "\n") - gothrow("dumpgs in STW - bad status") + throw("dumpgs in STW - bad status") case _Gdead: // ok case _Grunnable, @@ -462,7 +462,7 @@ func dumpobjs() { size := s.elemsize n := (s.npages << _PageShift) / size if n > uintptr(len(freemark)) { - gothrow("freemark array doesn't have enough entries") + throw("freemark array doesn't have enough entries") } for l := s.freelist; l.ptr() != nil; l = l.ptr().next { freemark[(uintptr(l)-p)/size] = true @@ -708,7 +708,7 @@ func makeheapobjbv(p uintptr, size uintptr) bitvector { n := nptr*_BitsPerPointer/8 + 1 p := sysAlloc(n, &memstats.other_sys) if p == nil { - gothrow("heapdump: out of memory") + throw("heapdump: out of memory") } tmpbuf = (*[1 << 30]byte)(p)[:n] } |
