aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index ea2d55dbb6..81d39fb48e 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -329,6 +329,9 @@ type p struct {
gfree *g
gfreecnt int32
+ sudogcache []*sudog
+ sudogbuf [128]*sudog
+
tracebuf *traceBuf
pad [64]byte
@@ -365,6 +368,10 @@ type schedt struct {
gfree *g
ngfree int32
+ // Central cache of sudog structs.
+ sudoglock mutex
+ sudogcache *sudog
+
gcwaiting uint32 // gc is waiting to run
stopwait int32
stopnote note