[maps] Support customizable map shapes [v8/v8 : main]

0 views
Skip to first unread message

Igor Sheludko (Gerrit)

unread,
Apr 27, 2026, 5:12:51 AM (yesterday) Apr 27
to Leszek Swirski, Michael Lippautz, Hannes Payer, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Leszek Swirski and Michael Lippautz

Igor Sheludko voted and added 2 comments

Votes added by Igor Sheludko

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Igor Sheludko . resolved

PTAL, I went with option 2.1 from the doc (option 2.2 had some complications that I missed initially).

File src/objects/map.cc
Line 1362, Patchset 1: WriteBarrier::ForRange(isolate->heap(), raw, slot, slot + count);
Igor Sheludko . unresolved

I didn't manage to make `cctest/test-heap/JSInterceptorMap` crash without this WB even with `--stress-compaction`, are there any other flags to try?

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Michael Lippautz
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: I1485e935bbaba791326df4947b495c5f60eba458
Gerrit-Change-Number: 7793258
Gerrit-PatchSet: 3
Gerrit-Owner: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Apr 2026 09:12:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
8:12 AM (11 hours ago) 8:12 AM
to Igor Sheludko, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Leszek Swirski, Hannes Payer, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Igor Sheludko and Leszek Swirski

Michael Lippautz added 7 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Michael Lippautz . resolved

generally looks good

File src/common/globals.h
Line 949, Patchset 4 (Latest):constexpr const char* ExtendedMapKind2String(ExtendedMapKind kind) {
Michael Lippautz . unresolved

...ToString

File src/diagnostics/objects-debug.cc
Line 682, Patchset 4 (Latest): }
Michael Lippautz . unresolved

For sandbox: default: UNREACHABLE()

(I know it's a bit annoying)

File src/diagnostics/objects-printer.cc
Line 4819, Patchset 4 (Latest): switch (map_ex->map_kind()) {
Michael Lippautz . unresolved

Same here: sandbox swich valiation

File src/objects/map-inl.h
Line 553, Patchset 4 (Latest): if (is_extended_map()) {
Michael Lippautz . unresolved

[[unlikely]]

File src/objects/map.h
Line 1336, Patchset 4 (Latest): uint8_t padding1_;
uint16_t padding2_;
Michael Lippautz . unresolved

Can we create a padding helper that uses packed structs?

E.g., would be nice to have an `AlignedUpToTaggedForExtendedMap dummy;` here.

File src/objects/map.cc
Line 1362, Patchset 1: WriteBarrier::ForRange(isolate->heap(), raw, slot, slot + count);
Igor Sheludko . unresolved

I didn't manage to make `cctest/test-heap/JSInterceptorMap` crash without this WB even with `--stress-compaction`, are there any other flags to try?

Michael Lippautz

`--stress-compaction` and maybe `--stress-incremental-marking` would be the flags to use here.

Open in Gerrit

Related details

Attention is currently required from:
  • Igor Sheludko
  • Leszek Swirski
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: I1485e935bbaba791326df4947b495c5f60eba458
Gerrit-Change-Number: 7793258
Gerrit-PatchSet: 4
Gerrit-Owner: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Tue, 28 Apr 2026 12:12:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Igor Sheludko <ish...@chromium.org>
unsatisfied_requirement
open
diffy

Igor Sheludko (Gerrit)

unread,
11:09 AM (9 hours ago) 11:09 AM
to Nico Hartmann, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Leszek Swirski, Michael Lippautz, Hannes Payer, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Leszek Swirski, Michael Lippautz and Nico Hartmann

Igor Sheludko voted and added 7 comments

Votes added by Igor Sheludko

Commit-Queue+1

7 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Igor Sheludko . resolved

Nico, PTAL at Torque

File src/common/globals.h
Line 949, Patchset 4:constexpr const char* ExtendedMapKind2String(ExtendedMapKind kind) {
Michael Lippautz . resolved

...ToString

Igor Sheludko

Done

File src/diagnostics/objects-debug.cc
Line 682, Patchset 4: }
Michael Lippautz . resolved

For sandbox: default: UNREACHABLE()

(I know it's a bit annoying)

Igor Sheludko

Done but slightly differently. I didn't use `default:` in order to enforce updating this switch then new kinds appear.

File src/diagnostics/objects-printer.cc
Line 4819, Patchset 4: switch (map_ex->map_kind()) {
Michael Lippautz . resolved

Same here: sandbox swich valiation

Igor Sheludko

It's better to leave it this way since it's annoying when printer crashes during debugging session of a sandbox issue. We'll see that it's broken from the `- extended map kind: <corrupt>` line.

File src/objects/map-inl.h
Line 553, Patchset 4: if (is_extended_map()) {
Michael Lippautz . resolved

[[unlikely]]

Igor Sheludko

Done

File src/objects/map.h
Line 1336, Patchset 4: uint8_t padding1_;
uint16_t padding2_;
Michael Lippautz . resolved

Can we create a padding helper that uses packed structs?

E.g., would be nice to have an `AlignedUpToTaggedForExtendedMap dummy;` here.

Igor Sheludko

I added support to Torque to generate fixed-size arrays in the middle of the object body. It seems to be the next simplest thing we can do.

File src/objects/map.cc
Line 1362, Patchset 1: WriteBarrier::ForRange(isolate->heap(), raw, slot, slot + count);
Igor Sheludko . resolved

I didn't manage to make `cctest/test-heap/JSInterceptorMap` crash without this WB even with `--stress-compaction`, are there any other flags to try?

Michael Lippautz

`--stress-compaction` and maybe `--stress-incremental-marking` would be the flags to use here.

Igor Sheludko

Nah, nothing worked ((

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Michael Lippautz
  • Nico Hartmann
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • 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: I1485e935bbaba791326df4947b495c5f60eba458
    Gerrit-Change-Number: 7793258
    Gerrit-PatchSet: 6
    Gerrit-Owner: Igor Sheludko <ish...@chromium.org>
    Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 28 Apr 2026 15:09:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Igor Sheludko <ish...@chromium.org>
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Nico Hartmann (Gerrit)

    unread,
    11:17 AM (8 hours ago) 11:17 AM
    to Igor Sheludko, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Leszek Swirski, Michael Lippautz, Hannes Payer, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski and Michael Lippautz

    Nico Hartmann added 1 comment

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Nico Hartmann . resolved

    src/torque LGTM

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    • Leszek Swirski
    • Michael Lippautz
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • 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: I1485e935bbaba791326df4947b495c5f60eba458
    Gerrit-Change-Number: 7793258
    Gerrit-PatchSet: 7
    Gerrit-Owner: Igor Sheludko <ish...@chromium.org>
    Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 28 Apr 2026 15:17:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Nico Hartmann (Gerrit)

    unread,
    11:17 AM (8 hours ago) 11:17 AM
    to Igor Sheludko, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Leszek Swirski, Michael Lippautz, Hannes Payer, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski and Michael Lippautz

    Nico Hartmann voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    • Leszek Swirski
    • Michael Lippautz
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • 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: I1485e935bbaba791326df4947b495c5f60eba458
      Gerrit-Change-Number: 7793258
      Gerrit-PatchSet: 7
      Gerrit-Owner: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
      Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
      Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
      Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
      Gerrit-CC: Hannes Payer <hpa...@chromium.org>
      Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
      Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
      Gerrit-Attention: Leszek Swirski <les...@chromium.org>
      Gerrit-Comment-Date: Tue, 28 Apr 2026 15:17:41 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Igor Sheludko (Gerrit)

      unread,
      1:06 PM (7 hours ago) 1:06 PM
      to Nico Hartmann, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Leszek Swirski, Michael Lippautz, Hannes Payer, mlippau...@chromium.org, v8-re...@googlegroups.com
      Attention needed from Leszek Swirski, Michael Lippautz and Nico Hartmann

      Igor Sheludko voted and added 1 comment

      Votes added by Igor Sheludko

      Commit-Queue+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 10 (Latest):
      Igor Sheludko . resolved

      I've lost Nico's +1 because required changes in src/torque/implementation-visitor.cc were landed inbetween (https://crrev.com/c/7800234).

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Leszek Swirski
      • Michael Lippautz
      • Nico Hartmann
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • 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: I1485e935bbaba791326df4947b495c5f60eba458
        Gerrit-Change-Number: 7793258
        Gerrit-PatchSet: 10
        Gerrit-Owner: Igor Sheludko <ish...@chromium.org>
        Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
        Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
        Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Comment-Date: Tue, 28 Apr 2026 17:06:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages