diff options
author | Sabyrzhan Tasbolatov <snovitoll@gmail.com> | 2024-04-14 16:55:57 +0500 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-04-22 22:07:41 +0000 |
commit | 552faa8927a23fd5967435295c14af1741ac3653 (patch) | |
tree | 29a005cdc9789cb3bf31a5997511dafab36435b9 /src/runtime/runtime2.go | |
parent | 674657e1304b0ea1815257623150a2e06d8ddac2 (diff) | |
download | go-552faa8927a23fd5967435295c14af1741ac3653.tar.gz go-552faa8927a23fd5967435295c14af1741ac3653.zip |
runtime: reduced struct sizes found via pahole
During my research of pahole with Go structs, I've found couple of
structs in runtime/ pkg where we can reduce several structs' sizes
highligted by pahole tool which detect byte holes and paddings.
Overall, there are 80 bytes reduced.
Change-Id: I398e5ed6f5b199394307741981cb5ad5b875e98f
Reviewed-on: https://go-review.googlesource.com/c/go/+/578795
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Joedian Reid <joedian@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r-- | src/runtime/runtime2.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index b58255f279..0093a6ddb9 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -510,12 +510,12 @@ type g struct { sleepWhen int64 // when to sleep until selectDone atomic.Uint32 // are we participating in a select and did someone win the race? - coroarg *coro // argument during coroutine transfers - // goroutineProfiled indicates the status of this goroutine's stack for the // current in-progress goroutine profile goroutineProfiled goroutineProfileStateHolder + coroarg *coro // argument during coroutine transfers + // Per-G tracer state. trace gTraceState @@ -604,8 +604,8 @@ type m struct { // there's no stack to put them on. That is their sole purpose. waitunlockf func(*g, unsafe.Pointer) bool waitlock unsafe.Pointer - waitTraceBlockReason traceBlockReason waitTraceSkip int + waitTraceBlockReason traceBlockReason syscalltick uint32 freelink *m // on sched.freem |