[go] runtime: remove specialized classes larger than 128 bytes

1 view
Skip to first unread message

Michael Matloob (Gerrit)

unread,
11:20 AM (12 hours ago) 11:20 AM
to goph...@pubsubhelper.golang.org, Michael Pratt, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
Attention needed from Michael Pratt

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63670d0c964957a020ba41b6e2e38e626a6a6964
Gerrit-Change-Number: 776740
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Attention: Michael Pratt <mpr...@google.com>
Gerrit-Comment-Date: Mon, 11 May 2026 15:20:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Michael Matloob (Gerrit)

unread,
12:38 PM (10 hours ago) 12:38 PM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Michael Matloob and Michael Pratt

Michael Matloob uploaded new patchset

Michael Matloob uploaded patch set #4 to this change.
Following approvals got outdated and were removed:
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Matloob
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63670d0c964957a020ba41b6e2e38e626a6a6964
Gerrit-Change-Number: 776740
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Attention: Michael Matloob <mat...@golang.org>
Gerrit-Attention: Michael Pratt <mpr...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Michael Matloob (Gerrit)

unread,
2:24 PM (9 hours ago) 2:24 PM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Michael Matloob and Michael Pratt

Michael Matloob uploaded new patchset

Michael Matloob uploaded patch set #5 to this change.
Following approvals got outdated and were removed:
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Matloob
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63670d0c964957a020ba41b6e2e38e626a6a6964
Gerrit-Change-Number: 776740
Gerrit-PatchSet: 5
unsatisfied_requirement
satisfied_requirement
open
diffy

Michael Pratt (Gerrit)

unread,
5:20 PM (6 hours ago) 5:20 PM
to Michael Matloob, goph...@pubsubhelper.golang.org, Michael Pratt, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
Attention needed from Michael Matloob

Michael Pratt voted and added 3 comments

Votes added by Michael Pratt

Code-Review+2

3 comments

File src/cmd/compile/internal/ir/symtab.go
Line 43, Patchset 6 (Latest): MallocGCSmallScanNoHeader [11]*obj.LSym
Michael Pratt . resolved

Is there any way we can make it easy to remember to update this number?

I had quite a frustrating time updating the map implementation trying to find all the little bits and bobs that needed updating in the compiler.

File src/cmd/compile/internal/ssagen/ssa.go
Line 809, Patchset 6 (Latest): if size > 128 {
Michael Pratt . unresolved

Mention that this must match the constant in mkmalloc.

(Or put in internal/abi if possible. But I'm not sure mkmalloc can import internal/abi?)

File src/runtime/_mkmalloc/constants.go
Line 29, Patchset 6 (Latest): specializedMallocMax = 128
Michael Pratt . unresolved

Mention that that must match the constant in the compiler.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Matloob
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63670d0c964957a020ba41b6e2e38e626a6a6964
Gerrit-Change-Number: 776740
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Attention: Michael Matloob <mat...@golang.org>
Gerrit-Comment-Date: Mon, 11 May 2026 21:20:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Matloob (Gerrit)

unread,
9:42 PM (1 hour ago) 9:42 PM
to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, golang-co...@googlegroups.com

Michael Matloob added 3 comments

File src/cmd/compile/internal/ir/symtab.go
Line 43, Patchset 6: MallocGCSmallScanNoHeader [11]*obj.LSym
Michael Pratt . resolved

Is there any way we can make it easy to remember to update this number?

I had quite a frustrating time updating the map implementation trying to find all the little bits and bobs that needed updating in the compiler.

Michael Matloob

I think we can generate a constant in internal/runtime/gc that's equal to the one in mkmalloc. I'll send a cl to do that and to add the 128 constant too.

File src/cmd/compile/internal/ssagen/ssa.go
Line 809, Patchset 6: if size > 128 {
Michael Pratt . resolved

Mention that this must match the constant in mkmalloc.

(Or put in internal/abi if possible. But I'm not sure mkmalloc can import internal/abi?)

Michael Matloob

Done

mkmalloc can't import internal/abi because we don't want to require that it's built with the same version of go. But we could put it internal/runtime/gc, because that's also generated by mkmalloc, so we can produce a constant there equal to the one in mkmalloc.

File src/runtime/_mkmalloc/constants.go
Line 29, Patchset 6: specializedMallocMax = 128
Michael Pratt . resolved

Mention that that must match the constant in the compiler.

Michael Matloob

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63670d0c964957a020ba41b6e2e38e626a6a6964
Gerrit-Change-Number: 776740
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 01:42:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Pratt <mpr...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Matloob (Gerrit)

unread,
9:42 PM (1 hour ago) 9:42 PM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Michael Matloob uploaded new patchset

Michael Matloob uploaded patch set #7 to this change.
Following approvals got outdated and were removed:
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Matloob (Gerrit)

unread,
10:18 PM (1 hour ago) 10:18 PM
to Michael Matloob, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, golang-co...@googlegroups.com
Attention needed from Michael Matloob

Michael Matloob voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Matloob
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63670d0c964957a020ba41b6e2e38e626a6a6964
Gerrit-Change-Number: 776740
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
Gerrit-Attention: Michael Matloob <mat...@golang.org>
Gerrit-Comment-Date: Tue, 12 May 2026 02:18:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages