]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/mgc.go
runtime: add execution tracer v2 behind GOEXPERIMENT=exectracer2
[gostls13.git] / src / runtime / mgc.go
index d015d6dbabaa8035f28b5debad991c9da3840195..b791acd163d67dfb11b9fd783bef96f12840f12b 100644 (file)
@@ -939,6 +939,9 @@ func gcMarkTermination() {
        mp.preemptoff = "gcing"
        mp.traceback = 2
        curgp := mp.curg
+       // N.B. The execution tracer is not aware of this status
+       // transition and handles it specially based on the
+       // wait reason.
        casGToWaiting(curgp, _Grunning, waitReasonGarbageCollection)
 
        // Run gc on the g0 stack. We do this so that the g stack
@@ -1359,6 +1362,10 @@ func gcBgMarkWorker() {
                        // the G stack. However, stack shrinking is
                        // disabled for mark workers, so it is safe to
                        // read from the G stack.
+                       //
+                       // N.B. The execution tracer is not aware of this status
+                       // transition and handles it specially based on the
+                       // wait reason.
                        casGToWaiting(gp, _Grunning, waitReasonGCWorkerActive)
                        switch pp.gcMarkWorkerMode {
                        default: