]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/runtime2.go
runtime: make it harder to introduce deadlocks with forEachP
[gostls13.git] / src / runtime / runtime2.go
index 885b493bad3847ae316be3bdb4a3aa27727ebc68..e7a3d4ed1ba2e4857bcc43fca70e3b33f9e01582 100644 (file)
@@ -423,7 +423,7 @@ type g struct {
        // stack describes the actual stack memory: [stack.lo, stack.hi).
        // stackguard0 is the stack pointer compared in the Go stack growth prologue.
        // It is stack.lo+StackGuard normally, but can be StackPreempt to trigger a preemption.
-       // stackguard1 is the stack pointer compared in the C stack growth prologue.
+       // stackguard1 is the stack pointer compared in the //go:systemstack stack growth prologue.
        // It is stack.lo+StackGuard on g0 and gsignal stacks.
        // It is ~0 on other goroutine stacks, to trigger a call to morestackc (and crash).
        stack       stack   // offset known to runtime/cgo
@@ -481,6 +481,7 @@ type g struct {
        parkingOnChan atomic.Bool
 
        raceignore    int8  // ignore race detection events
+       nocgocallback bool  // whether disable callback from C
        tracking      bool  // whether we're tracking this G for sched latency statistics
        trackingSeq   uint8 // used to decide whether to track this G
        trackingStamp int64 // timestamp of when the G last started being tracked
@@ -618,6 +619,9 @@ type m struct {
        // Whether this is a pending preemption signal on this M.
        signalPending atomic.Uint32
 
+       // pcvalue lookup cache
+       pcvalueCache pcvalueCache
+
        dlogPerM
 
        mOS
@@ -956,7 +960,7 @@ type funcinl struct {
 // layout of Itab known to compilers
 // allocated in non-garbage-collected memory
 // Needs to be in sync with
-// ../cmd/compile/internal/reflectdata/reflect.go:/^func.WriteTabs.
+// ../cmd/compile/internal/reflectdata/reflect.go:/^func.WritePluginTable.
 type itab struct {
        inter *interfacetype
        _type *_type
@@ -1108,6 +1112,7 @@ const (
        waitReasonDebugCall                               // "debug call"
        waitReasonGCMarkTermination                       // "GC mark termination"
        waitReasonStoppingTheWorld                        // "stopping the world"
+       waitReasonFlushProcCaches                         // "flushing proc caches"
 )
 
 var waitReasonStrings = [...]string{
@@ -1143,6 +1148,7 @@ var waitReasonStrings = [...]string{
        waitReasonDebugCall:             "debug call",
        waitReasonGCMarkTermination:     "GC mark termination",
        waitReasonStoppingTheWorld:      "stopping the world",
+       waitReasonFlushProcCaches:       "flushing proc caches",
 }
 
 func (w waitReason) String() string {