[wasm] Exclude ref.test from Wasm GC use counter [v8/v8 : main]

0 views
Skip to first unread message

Jakob Kummerow (Gerrit)

unread,
Jul 23, 2026, 6:52:12 AM (2 days ago) Jul 23
to Thomas Lively, Jakob Kummerow, Thomas Nattestad, Deepti Gandluri, v8-re...@googlegroups.com, was...@google.com
Attention needed from Thomas Lively

Jakob Kummerow voted and added 3 comments

Votes added by Jakob Kummerow

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jakob Kummerow . resolved

Debatable, but I guess I'm OK with this.

Commit Message
Line 12, Patchset 1 (Latest):uses of ref.test to avoid artificially inflating use counts.
Jakob Kummerow . unresolved

That wording is a bit strong, don't you think? The status quo counts all GC-prefixed instructions (which came with the GC proposal!), whereas this CL "artifically deflates" the count by introducing a rather arbitrary definition of usage that's so insignificant that we choose not to count it.

File test/unittests/wasm/wasm-usecounters.cc
Line 30, Patchset 1 (Latest): GetUseCounterMap().clear();
Jakob Kummerow . unresolved

Not necessary; we don't support running multiple tests in the same process anyway.

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Lively
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ieb985ca23a364876aa48dc992f24fa4e5e5e2abe
Gerrit-Change-Number: 8135534
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Lively <tli...@google.com>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-CC: Thomas Nattestad <natt...@google.com>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 10:52:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jul 23, 2026, 7:25:09 AM (2 days ago) Jul 23
to Thomas Lively, Jakob Kummerow, Thomas Nattestad, Deepti Gandluri, v8-re...@googlegroups.com, was...@google.com
Attention needed from Thomas Lively

Matthias Liedtke added 1 comment

Commit Message
Line 12, Patchset 1 (Latest):uses of ref.test to avoid artificially inflating use counts.
Jakob Kummerow . unresolved

That wording is a bit strong, don't you think? The status quo counts all GC-prefixed instructions (which came with the GC proposal!), whereas this CL "artifically deflates" the count by introducing a rather arbitrary definition of usage that's so insignificant that we choose not to count it.

Matthias Liedtke

I'd go one step further, I disagree with this. If we have another implementation that does the same but uses `br_on_cast`, would we drop that instruction as well? At which operation would we draw the line? Is usage of `i31ref` enough to qualify for "wasm-gc" even though there isn't any GC involved for it in V8? Would we need at least a struct or array type? What if that type is defined but not used?

I think these counters should reflect "uses a feature of this proposal", if you define two memories, then your module uses multi-memory even if you never access the second memory.

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Lively
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ieb985ca23a364876aa48dc992f24fa4e5e5e2abe
Gerrit-Change-Number: 8135534
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Lively <tli...@google.com>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-CC: Thomas Nattestad <natt...@google.com>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 11:24:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jakob Kummerow <jkum...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jakob Kummerow (Gerrit)

unread,
Jul 23, 2026, 8:00:43 AM (2 days ago) Jul 23
to Thomas Lively, Matthias Liedtke, Jakob Kummerow, Thomas Nattestad, Deepti Gandluri, v8-re...@googlegroups.com, was...@google.com
Attention needed from Thomas Lively

Jakob Kummerow voted and added 1 comment

Votes added by Jakob Kummerow

Code-Review+0

1 comment

Patchset-level comments
Jakob Kummerow . resolved

In light of the amount of skepticism (mostly expressed offline) I'd like to understand better what the motivation is before landing this. What are we hoping to get out of the WasmGC use counter? Would it make sense to introduce a separate counter with a different scope?

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Lively
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ieb985ca23a364876aa48dc992f24fa4e5e5e2abe
Gerrit-Change-Number: 8135534
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Lively <tli...@google.com>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-CC: Thomas Nattestad <natt...@google.com>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 12:00:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Thomas Lively (Gerrit)

unread,
Jul 23, 2026, 2:30:08 PM (2 days ago) Jul 23
to Matthias Liedtke, Jakob Kummerow, Thomas Nattestad, Deepti Gandluri, v8-re...@googlegroups.com, was...@google.com
Attention needed from Jakob Kummerow and Matthias Liedtke

Thomas Lively added 2 comments

Patchset-level comments
Jakob Kummerow . unresolved

In light of the amount of skepticism (mostly expressed offline) I'd like to understand better what the motivation is before landing this. What are we hoping to get out of the WasmGC use counter? Would it make sense to introduce a separate counter with a different scope?

Thomas Lively

The motivation is that we look at trends in Wasm GC usage and it looks really great, but I have a strong suspicion that a lot of the usage is actually just Python. What I'd really like to know is the usage trends for modules produced from Wasm GC toolchains, i.e. not Python.

What do you both think about a new use counter that only looks for allocation instructions, e.g. struct.new and array.new? I think that will be a better match for "real Wasm GC usage" in the interesting sense.

Commit Message
Line 12, Patchset 1 (Latest):uses of ref.test to avoid artificially inflating use counts.
Jakob Kummerow . unresolved

That wording is a bit strong, don't you think? The status quo counts all GC-prefixed instructions (which came with the GC proposal!), whereas this CL "artifically deflates" the count by introducing a rather arbitrary definition of usage that's so insignificant that we choose not to count it.

Matthias Liedtke

I'd go one step further, I disagree with this. If we have another implementation that does the same but uses `br_on_cast`, would we drop that instruction as well? At which operation would we draw the line? Is usage of `i31ref` enough to qualify for "wasm-gc" even though there isn't any GC involved for it in V8? Would we need at least a struct or array type? What if that type is defined but not used?

I think these counters should reflect "uses a feature of this proposal", if you define two memories, then your module uses multi-memory even if you never access the second memory.

Thomas Lively

Fair enough, makes sense.

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Kummerow
  • Matthias Liedtke
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ieb985ca23a364876aa48dc992f24fa4e5e5e2abe
Gerrit-Change-Number: 8135534
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Lively <tli...@google.com>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-CC: Thomas Nattestad <natt...@google.com>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Jul 2026 18:30:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
Comment-In-Reply-To: Jakob Kummerow <jkum...@chromium.org>
unsatisfied_requirement
open
diffy

Thomas Lively (Gerrit)

unread,
Jul 24, 2026, 12:40:01 PM (16 hours ago) Jul 24
to Matthias Liedtke, Jakob Kummerow, Thomas Nattestad, Deepti Gandluri, v8-re...@googlegroups.com, was...@google.com

Thomas Lively abandoned this change.

View Change

Thomas Lively abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages