[go] runtime: try shortening malloc path

1 view
Skip to first unread message

Michael Matloob (Gerrit)

unread,
May 18, 2026, 9:48:55 AM (22 hours ago) May 18
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: Ifa7822de630e3692f4753086871186af6a6a6964
Gerrit-Change-Number: 776120
Gerrit-PatchSet: 45
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, 18 May 2026 13:48:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Michael Matloob (Gerrit)

unread,
May 18, 2026, 1:59:12 PM (18 hours ago) May 18
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 #47 to this change.
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: Ifa7822de630e3692f4753086871186af6a6a6964
Gerrit-Change-Number: 776120
Gerrit-PatchSet: 47
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,
May 18, 2026, 4:00:17 PM (16 hours ago) May 18
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 and Michael Pratt

Michael Matloob voted Code-Review+1

Code-Review+1
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: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ifa7822de630e3692f4753086871186af6a6a6964
Gerrit-Change-Number: 776120
Gerrit-PatchSet: 49
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Attention: Michael Matloob <mat...@golang.org>
Gerrit-Attention: Michael Pratt <mpr...@google.com>
Gerrit-Comment-Date: Mon, 18 May 2026 20:00:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Michael Pratt (Gerrit)

unread,
May 18, 2026, 4:07:34 PM (16 hours ago) May 18
to Michael Matloob, goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, golang-co...@googlegroups.com
Attention needed from Michael Matloob

Michael Pratt added 3 comments

File src/runtime/malloc_generated.go
Line 2638, Patchset 49 (Latest): deductAssistCredit(size)
Michael Pratt . resolved

Is it intentional that this came back? (I think it's fine given that this is the slow path, just checking)

Line 2686, Patchset 49 (Latest): const nbytes = npages_ * 8192
Michael Pratt . unresolved

Where are this and noscanint_ defined? It seems like they should be undefined to avoid invalid uses like this sneaking in (i.e., if the generator fails to replace these due to a bug, it results in a build failure).

I know this is dead code, but it looks confusing to have something totally bogus in the generated code.

File src/runtime/malloc_stubs.go
Line 86, Patchset 49 (Latest): if !isTiny_ {
Michael Pratt . unresolved

Drop this branch to make this a bit cleaner, it's unnecessary since the case above returns.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Matloob
Submit Requirements:
    • requirement is not 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: Ifa7822de630e3692f4753086871186af6a6a6964
    Gerrit-Change-Number: 776120
    Gerrit-PatchSet: 49
    Gerrit-Owner: Michael Matloob <mat...@golang.org>
    Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
    Gerrit-Reviewer: Michael Matloob <mat...@google.com>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-Attention: Michael Matloob <mat...@golang.org>
    Gerrit-Comment-Date: Mon, 18 May 2026 20:07:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Michael Matloob (Gerrit)

    unread,
    May 18, 2026, 4:36:05 PM (16 hours ago) May 18
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Michael Matloob

    Michael Matloob uploaded new patchset

    Michael Matloob uploaded patch set #51 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Matloob
    Submit Requirements:
    • requirement is not 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: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifa7822de630e3692f4753086871186af6a6a6964
    Gerrit-Change-Number: 776120
    Gerrit-PatchSet: 51
    unsatisfied_requirement
    open
    diffy

    Michael Matloob (Gerrit)

    unread,
    May 18, 2026, 4:56:24 PM (15 hours ago) May 18
    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 #52 to this change.
    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: Ifa7822de630e3692f4753086871186af6a6a6964
      Gerrit-Change-Number: 776120
      Gerrit-PatchSet: 52
      Gerrit-Owner: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Michael Matloob <mat...@google.com>
      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,
      May 18, 2026, 4:56:24 PM (15 hours ago) May 18
      to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, Michael Pratt, golang-co...@googlegroups.com
      Attention needed from Michael Matloob and Michael Pratt

      Michael Matloob added 3 comments

      File src/runtime/malloc_generated.go
      Line 2638, Patchset 49: deductAssistCredit(size)
      Michael Pratt . resolved

      Is it intentional that this came back? (I think it's fine given that this is the slow path, just checking)

      Michael Matloob

      Oh it's not! Thanks!

      Line 2686, Patchset 49: const nbytes = npages_ * 8192
      Michael Pratt . resolved

      Where are this and noscanint_ defined? It seems like they should be undefined to avoid invalid uses like this sneaking in (i.e., if the generator fails to replace these due to a bug, it results in a build failure).

      I know this is dead code, but it looks confusing to have something totally bogus in the generated code.

      Michael Matloob

      I updated the stub to leave this out in the slow path case.

      File src/runtime/malloc_stubs.go
      Line 86, Patchset 49: if !isTiny_ {
      Michael Pratt . resolved

      Drop this branch to make this a bit cleaner, it's unnecessary since the case above returns.

      Michael Matloob

      Done

      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: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ifa7822de630e3692f4753086871186af6a6a6964
      Gerrit-Change-Number: 776120
      Gerrit-PatchSet: 52
      Gerrit-Owner: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Michael Matloob <mat...@google.com>
      Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Michael Pratt <mpr...@google.com>
      Gerrit-Comment-Date: Mon, 18 May 2026 20:56:20 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Michael Pratt <mpr...@google.com>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Michael Matloob (Gerrit)

      unread,
      May 18, 2026, 10:07:21 PM (10 hours ago) May 18
      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 #54 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: Ifa7822de630e3692f4753086871186af6a6a6964
      Gerrit-Change-Number: 776120
      Gerrit-PatchSet: 54
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Michael Matloob (Gerrit)

      unread,
      7:59 AM (10 minutes ago) 7:59 AM
      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 #55 to this change.
      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: Ifa7822de630e3692f4753086871186af6a6a6964
      Gerrit-Change-Number: 776120
      Gerrit-PatchSet: 55
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages