We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a689f6b commit a1f7db8Copy full SHA for a1f7db8
src/runtime/mgcmark.go
@@ -642,7 +642,17 @@ func gcFlushBgCredit(scanWork int64) {
642
unlock(&work.assistQueue.lock)
643
}
644
645
+// scanstack scans gp's stack, greying all pointers found on the stack.
646
+//
647
+// During mark phase, it also installs stack barriers while traversing
648
+// gp's stack. During mark termination, it stops scanning when it
649
+// reaches an unhit stack barrier.
650
651
+// scanstack is marked go:systemstack because it must not be preempted
652
+// while using a workbuf.
653
654
//go:nowritebarrier
655
+//go:systemstack
656
func scanstack(gp *g) {
657
if gp.gcscanvalid {
658
return
0 commit comments