diff options
| author | Austin Clements <austin@google.com> | 2017-06-13 11:14:43 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2017-06-14 00:43:30 +0000 |
| commit | f4f018518d6f8ca220871da072c7afe33e1cdbcb (patch) | |
| tree | d35e006fb92ab1ae7e790fe33af1ba1354f56dac /src/runtime/runtime2.go | |
| parent | 0253299ab39c45f5694d35a233b83b23c69ec97f (diff) | |
| download | go-f4f018518d6f8ca220871da072c7afe33e1cdbcb.tar.xz | |
runtime: move pdesc into p
There are currently two arrays indexed by P ID: allp and pdesc.
Consolidate these by moving the pdesc fields into type p so they can
be indexed off allp along with all other per-P state.
For #15131.
Change-Id: Ib6c4e6e7612281a1171ba4a0d62e52fd59e960b4
Reviewed-on: https://go-review.googlesource.com/45572
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 2df1fefe7c..6871d9c68c 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -453,9 +453,10 @@ type p struct { id int32 status uint32 // one of pidle/prunning/... link puintptr - schedtick uint32 // incremented on every scheduler call - syscalltick uint32 // incremented on every system call - m muintptr // back-link to associated m (nil if idle) + schedtick uint32 // incremented on every scheduler call + syscalltick uint32 // incremented on every system call + sysmontick sysmontick // last tick observed by sysmon + m muintptr // back-link to associated m (nil if idle) mcache *mcache racectx uintptr |
