From 1aa5730f4940b9e11c4461817493e47de1874d77 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Thu, 18 Aug 2022 22:53:19 +0700 Subject: [PATCH] runtime: remove p padding field for atomic fields alignment CL 424396 and CL 424397 changed timer0When/timerModifiedEarliest to atomic.Uint64, just they're guaranted to have 64-bit alignment. Change-Id: Idaff1059da2aac84520b9b0e34f9721a74dbba5a Reviewed-on: https://go-review.googlesource.com/c/go/+/424794 Auto-Submit: Cuong Manh Le Reviewed-by: Michael Knyszek TryBot-Result: Gopher Robot Run-TryBot: Cuong Manh Le Reviewed-by: Michael Pratt --- src/runtime/align_runtime_test.go | 2 -- src/runtime/runtime2.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/runtime/align_runtime_test.go b/src/runtime/align_runtime_test.go index 2c448d4a09..3a6a575481 100644 --- a/src/runtime/align_runtime_test.go +++ b/src/runtime/align_runtime_test.go @@ -14,8 +14,6 @@ import "unsafe" // operations (all the *64 operations in runtime/internal/atomic). var AtomicFields = []uintptr{ unsafe.Offsetof(m{}.procid), - unsafe.Offsetof(p{}.timer0When), - unsafe.Offsetof(p{}.timerModifiedEarliest), unsafe.Offsetof(p{}.gcFractionalMarkTime), unsafe.Offsetof(profBuf{}.overflow), unsafe.Offsetof(profBuf{}.overflowTime), diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 56318e2bce..5e12ac73bc 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -667,8 +667,6 @@ type p struct { palloc persistentAlloc // per-P to avoid mutex - _ uint32 // Alignment for atomic fields below - // The when field of the first entry on the timer heap. // This is 0 if the timer heap is empty. timer0When atomic.Int64