]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused scanSize parameter to gcmarknewobject
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 7 Sep 2022 20:33:06 +0000 (20:33 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 8 Sep 2022 16:06:04 +0000 (16:06 +0000)
This was left over from the old pacer, and never removed when the old
pacer was removed in Go 1.19.

Change-Id: I79e5f0420c6100c66bd06129a68f5bbab7c1ea8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/429256
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/malloc.go
src/runtime/mgcmark.go

index 205c6d44a8dfb954286817b06f344f5b326e1721..f2b93c04f4a42afab5e00c271f9e4ec4b1ddafba 100644 (file)
@@ -1052,8 +1052,8 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
                }
        }
 
-       var scanSize uintptr
        if !noscan {
+               var scanSize uintptr
                heapBitsSetType(uintptr(x), size, dataSize, typ)
                if dataSize > typ.size {
                        // Array allocation. If there are any
@@ -1081,7 +1081,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
        // This may be racing with GC so do it atomically if there can be
        // a race marking the bit.
        if gcphase != _GCoff {
-               gcmarknewobject(span, uintptr(x), size, scanSize)
+               gcmarknewobject(span, uintptr(x), size)
        }
 
        if raceenabled {
index 8d3259c79a7dedd41ef97f0e736faf566f8b7693..90240c315948824143293c468ac78c6fef75f5e2 100644 (file)
@@ -1563,7 +1563,7 @@ func gcDumpObject(label string, obj, off uintptr) {
 //
 //go:nowritebarrier
 //go:nosplit
-func gcmarknewobject(span *mspan, obj, size, scanSize uintptr) {
+func gcmarknewobject(span *mspan, obj, size uintptr) {
        if useCheckmark { // The world should be stopped so this should not happen.
                throw("gcmarknewobject called while doing checkmark")
        }