Commit d727312c authored by Austin Clements's avatar Austin Clements

runtime: remove unused marking parfor

The GC now handles the root marking jobs as part of general marking,
so work.markfor is no longer used.

Change-Id: I6c3b23fed27e4e7ea6430d6ca7ba25ae4d04ed14
Reviewed-on: https://go-review.googlesource.com/16811
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f32f2954
...@@ -161,7 +161,6 @@ func gcinit() { ...@@ -161,7 +161,6 @@ func gcinit() {
throw("size of Workbuf is suboptimal") throw("size of Workbuf is suboptimal")
} }
work.markfor = parforalloc(_MaxGcproc)
_ = setGCPercent(readgogc()) _ = setGCPercent(readgogc())
for datap := &firstmoduledata; datap != nil; datap = datap.next { for datap := &firstmoduledata; datap != nil; datap = datap.next {
datap.gcdatamask = progToPointerMask((*byte)(unsafe.Pointer(datap.gcdata)), datap.edata-datap.data) datap.gcdatamask = progToPointerMask((*byte)(unsafe.Pointer(datap.gcdata)), datap.edata-datap.data)
...@@ -743,7 +742,6 @@ var work struct { ...@@ -743,7 +742,6 @@ var work struct {
nwait uint32 nwait uint32
ndone uint32 ndone uint32
alldone note alldone note
markfor *parfor
// Number of roots of various root types. Set by gcMarkRootPrepare. // Number of roots of various root types. Set by gcMarkRootPrepare.
nDataRoots, nBSSRoots, nSpanRoots, nStackRoots int nDataRoots, nBSSRoots, nSpanRoots, nStackRoots int
......
...@@ -97,7 +97,7 @@ var oneptrmask = [...]uint8{1} ...@@ -97,7 +97,7 @@ var oneptrmask = [...]uint8{1}
// Preemption must be disabled (because this uses a gcWork). // Preemption must be disabled (because this uses a gcWork).
// //
//go:nowritebarrier //go:nowritebarrier
func markroot(desc *parfor, i uint32) { func markroot(i uint32) {
// TODO: Consider using getg().m.p.ptr().gcw. // TODO: Consider using getg().m.p.ptr().gcw.
var gcw gcWork var gcw gcWork
...@@ -796,7 +796,7 @@ func gcDrain(gcw *gcWork, flags gcDrainFlags) { ...@@ -796,7 +796,7 @@ func gcDrain(gcw *gcWork, flags gcDrainFlags) {
break break
} }
// TODO: Pass in gcw. // TODO: Pass in gcw.
markroot(nil, job) markroot(job)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment