aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mbitmap.go
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2017-05-22 07:42:42 +0200
committerMartin Möhrmann <moehrmann@google.com>2017-08-08 06:43:49 +0000
commit7045e6f6c458908e1d5082381b3506a65059eac3 (patch)
treee9f930d0d0889cc3152c0e08222182f38f696208 /src/runtime/mbitmap.go
parentfd29d03f70238abf460f56209a2ccc76dec6509e (diff)
downloadgo-7045e6f6c458908e1d5082381b3506a65059eac3.tar.gz
go-7045e6f6c458908e1d5082381b3506a65059eac3.zip
runtime: remove unused prefetch functions
The only non test user of the assembler prefetch functions is the heapBits.prefetch function which is itself unused. The runtime prefetch functions have no functionality on most platforms and are not inlineable since they are written in assembler. The function call overhead eliminates the performance gains that could be achieved with prefetching and would degrade performance for platforms where the functions are no-ops. If prefetch functions are needed back again later they can be improved by avoiding the function call overhead and implementing them as intrinsics. Change-Id: I52c553cf3607ffe09f0441c6e7a0a818cb21117d Reviewed-on: https://go-review.googlesource.com/44370 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/mbitmap.go')
-rw-r--r--src/runtime/mbitmap.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go
index 2a9f1b83e5..23afc7dd04 100644
--- a/src/runtime/mbitmap.go
+++ b/src/runtime/mbitmap.go
@@ -449,11 +449,6 @@ func heapBitsForObject(p, refBase, refOff uintptr) (base uintptr, hbits heapBits
return
}
-// prefetch the bits.
-func (h heapBits) prefetch() {
- prefetchnta(uintptr(unsafe.Pointer((h.bitp))))
-}
-
// next returns the heapBits describing the next pointer-sized word in memory.
// That is, if h describes address p, h.next() describes p+ptrSize.
// Note that next does not modify h. The caller must record the result.