1
0
mirror of https://github.com/golang/go synced 2024-11-23 06:40:05 -07:00

runtime: delete unused function dumpbvtypes

The function dumpbvtypes has no use case anymore, so we remove it with
this change.

Change-Id: I1e0323542be2bcc683b75dffde76b222e087c285
Reviewed-on: https://go-review.googlesource.com/66370
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Marvin Stenger 2017-09-21 17:11:39 +02:00 committed by Keith Randall
parent d0006e7868
commit 9ec5f5b35f

View File

@ -200,7 +200,6 @@ func dumptype(t *_type) {
// dump an object
func dumpobj(obj unsafe.Pointer, size uintptr, bv bitvector) {
dumpbvtypes(&bv, obj)
dumpint(tagObject)
dumpint(uint64(uintptr(obj)))
dumpmemrange(obj, size)
@ -261,14 +260,9 @@ func dumpframe(s *stkframe, arg unsafe.Pointer) bool {
}
stkmap := (*stackmap)(funcdata(f, _FUNCDATA_LocalsPointerMaps))
// Dump any types we will need to resolve Efaces.
if child.args.n >= 0 {
dumpbvtypes(&child.args, unsafe.Pointer(s.sp+child.argoff))
}
var bv bitvector
if stkmap != nil && stkmap.n > 0 {
bv = stackmapdata(stkmap, pcdata)
dumpbvtypes(&bv, unsafe.Pointer(s.varp-uintptr(bv.n*sys.PtrSize)))
} else {
bv.n = -1
}
@ -423,14 +417,12 @@ func finq_callback(fn *funcval, obj unsafe.Pointer, nret uintptr, fint *_type, o
func dumproots() {
// TODO(mwhudson): dump datamask etc from all objects
// data segment
dumpbvtypes(&firstmoduledata.gcdatamask, unsafe.Pointer(firstmoduledata.data))
dumpint(tagData)
dumpint(uint64(firstmoduledata.data))
dumpmemrange(unsafe.Pointer(firstmoduledata.data), firstmoduledata.edata-firstmoduledata.data)
dumpfields(firstmoduledata.gcdatamask)
// bss segment
dumpbvtypes(&firstmoduledata.gcbssmask, unsafe.Pointer(firstmoduledata.bss))
dumpint(tagBSS)
dumpint(uint64(firstmoduledata.bss))
dumpmemrange(unsafe.Pointer(firstmoduledata.bss), firstmoduledata.ebss-firstmoduledata.bss)
@ -677,16 +669,6 @@ func dumpfields(bv bitvector) {
dumpint(fieldKindEol)
}
// The heap dump reader needs to be able to disambiguate
// Eface entries. So it needs to know every type that might
// appear in such an entry. The following routine accomplishes that.
// TODO(rsc, khr): Delete - no longer possible.
// Dump all the types that appear in the type field of
// any Eface described by this bit vector.
func dumpbvtypes(bv *bitvector, base unsafe.Pointer) {
}
func makeheapobjbv(p uintptr, size uintptr) bitvector {
// Extend the temp buffer if necessary.
nptr := size / sys.PtrSize