Fix WinHeap accounting for large allocations [chromium/src : main]

3 views
Skip to first unread message

José Dapena Paz (Gerrit)

unread,
May 6, 2026, 4:02:12 AMMay 6
to chromium...@chromium.org, spang...@chromium.org, wfh+...@chromium.org, tracing...@chromium.org

José Dapena Paz has uploaded the change for review

Commit message

Fix WinHeap accounting for large allocations

HeapWalk reports normal heap regions as PROCESS_HEAP_REGION entries, but
large allocations appear only as orphan busy entries outside any region.
Without tracking those, the WinHeap dump under-reports committed memory
in memory-infra traces.

Count busy entries that fall outside any region as committed memory.
Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0

Change diff


Change information

Files:
  • M base/trace_event/malloc_dump_provider.cc
Change size: S
Delta: 1 file changed, 29 insertions(+), 2 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
Gerrit-Change-Number: 7816237
Gerrit-PatchSet: 1
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

José Dapena Paz (Gerrit)

unread,
May 7, 2026, 5:02:53 AMMay 7
to Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Mikhail Khokhlov

José Dapena Paz added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
José Dapena Paz . resolved

This is the first in a series of changes to the memory accounting, that intends to improve and unify how the malloc/ section in memory infra captures is represented.

Open in Gerrit

Related details

Attention is currently required from:
  • Mikhail Khokhlov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
Gerrit-Change-Number: 7816237
Gerrit-PatchSet: 3
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Mikhail Khokhlov <khok...@google.com>
Gerrit-Attention: Mikhail Khokhlov <khok...@google.com>
Gerrit-Comment-Date: Thu, 07 May 2026 09:02:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mikhail Khokhlov (Gerrit)

unread,
May 7, 2026, 6:22:44 AMMay 7
to José Dapena Paz, Siddhartha S, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from José Dapena Paz and Siddhartha S

Mikhail Khokhlov added 1 comment

Patchset-level comments
Mikhail Khokhlov . resolved

ssid@ PTAL, since this is memory-infra related.

Open in Gerrit

Related details

Attention is currently required from:
  • José Dapena Paz
  • Siddhartha S
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
Gerrit-Change-Number: 7816237
Gerrit-PatchSet: 3
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
Gerrit-Attention: Siddhartha S <ss...@chromium.org>
Gerrit-Comment-Date: Thu, 07 May 2026 10:22:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Siddhartha S (Gerrit)

unread,
May 8, 2026, 1:00:35 AMMay 8
to José Dapena Paz, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from José Dapena Paz

Siddhartha S added 2 comments

File base/trace_event/malloc_dump_provider.cc
Line 76, Patchset 3 (Latest):void WinHeapMemoryDumpImpl(WinHeapInfo* crt_heap_info) {
Siddhartha S . unresolved

can we test this in unittests. can they call HeapWalk? can we add some sanity checks for range of numbers we should see..

Line 94, Patchset 3 (Latest): if (entry_addr < last_region_start || entry_addr >= last_region_end) {
Siddhartha S . unresolved

this code depends on the ordering guarantees of the HeapWalk, maybe add a comment to the documentation that provides this guarantee

Open in Gerrit

Related details

Attention is currently required from:
  • José Dapena Paz
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
    Gerrit-Change-Number: 7816237
    Gerrit-PatchSet: 3
    Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
    Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
    Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
    Gerrit-Comment-Date: Fri, 08 May 2026 05:00:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Will Harris (Gerrit)

    unread,
    May 8, 2026, 1:03:52 AMMay 8
    to José Dapena Paz, Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from José Dapena Paz

    Will Harris added 1 comment

    Patchset-level comments
    José Dapena Paz . unresolved

    This is the first in a series of changes to the memory accounting, that intends to improve and unify how the malloc/ section in memory infra captures is represented.

    Will Harris

    If this is a series of CLs can you create a task in the issue tracker representing the goal and the approach so the CLs can be tagged to the bug. Thanks.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • José Dapena Paz
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
    Gerrit-Change-Number: 7816237
    Gerrit-PatchSet: 3
    Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
    Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
    Gerrit-CC: Will Harris <w...@chromium.org>
    Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
    Gerrit-Comment-Date: Fri, 08 May 2026 05:03:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: José Dapena Paz <jda...@igalia.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    José Dapena Paz (Gerrit)

    unread,
    May 18, 2026, 2:16:36 PMMay 18
    to Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Siddhartha S and Will Harris

    José Dapena Paz added 3 comments

    Patchset-level comments
    José Dapena Paz . resolved

    This is the first in a series of changes to the memory accounting, that intends to improve and unify how the malloc/ section in memory infra captures is represented.

    Will Harris

    If this is a series of CLs can you create a task in the issue tracker representing the goal and the approach so the CLs can be tagged to the bug. Thanks.

    José Dapena Paz

    I created independent tickets for each bug, and each of the functional changes, as all were surfaced when trying to improve the malloc reported information in Linux and Windows, but there is not strict relation among them.

    Bugs:

    Then the features:

    File base/trace_event/malloc_dump_provider.cc
    Line 76, Patchset 3:void WinHeapMemoryDumpImpl(WinHeapInfo* crt_heap_info) {
    Siddhartha S . resolved

    can we test this in unittests. can they call HeapWalk? can we add some sanity checks for range of numbers we should see..

    José Dapena Paz

    Adding unit tests (with a small refactoring to be able to call the win heap dump from the test).

    Line 94, Patchset 3: if (entry_addr < last_region_start || entry_addr >= last_region_end) {
    Siddhartha S . resolved

    this code depends on the ordering guarantees of the HeapWalk, maybe add a comment to the documentation that provides this guarantee

    José Dapena Paz

    I will add a comment referring to the SDK document explaining this.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Siddhartha S
    • Will Harris
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
      Gerrit-Change-Number: 7816237
      Gerrit-PatchSet: 4
      Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
      Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
      Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
      Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
      Gerrit-CC: Will Harris <w...@chromium.org>
      Gerrit-Attention: Will Harris <w...@chromium.org>
      Gerrit-Attention: Siddhartha S <ss...@chromium.org>
      Gerrit-Comment-Date: Mon, 18 May 2026 18:16:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: José Dapena Paz <jda...@igalia.com>
      Comment-In-Reply-To: Will Harris <w...@chromium.org>
      Comment-In-Reply-To: Siddhartha S <ss...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Will Harris (Gerrit)

      unread,
      May 18, 2026, 3:47:56 PMMay 18
      to José Dapena Paz, Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from José Dapena Paz and Siddhartha S

      Will Harris added 4 comments

      Patchset-level comments
      File-level comment, Patchset 4 (Latest):
      Will Harris . unresolved

      this is cool I did not know about this behavior of heap where the values were optional. this seems like a very reasonable approach to fix this issue. thank you!

      what are these data used for - is this going to change metrics in any way?

      File base/trace_event/malloc_dump_provider.h
      Line 174, Patchset 4 (Latest):BASE_EXPORT void WinHeapMemoryDumpImpl(void* heap, WinHeapInfo* info);
      Will Harris . unresolved

      `info` is a non-optional out param, so please use a ref here.

      File base/trace_event/malloc_dump_provider.cc
      Line 78, Patchset 4 (Latest): reinterpret_cast<HANDLE>(_get_heap_handle()), &main_heap_info);
      Will Harris . unresolved

      this is passing a HANDLE and yet the function takes a void* - can you fix?

      Line 315, Patchset 4 (Latest): info->committed_size += heap_entry.cbData + heap_entry.cbOverhead;
      Will Harris . unresolved

      cbData is DWORD 32-bit - should this be promoted to a `size_t` before the addition, so very large `cbData` sizes near the 32-bit boundary can't overflow?

      e.g.

      `static_cast<size_t>(heap_entry.cbData)`

      Open in Gerrit

      Related details

      Attention is currently required from:
      • José Dapena Paz
      • Siddhartha S
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
        Gerrit-Change-Number: 7816237
        Gerrit-PatchSet: 4
        Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
        Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
        Gerrit-CC: Will Harris <w...@chromium.org>
        Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
        Gerrit-Attention: Siddhartha S <ss...@chromium.org>
        Gerrit-Comment-Date: Mon, 18 May 2026 19:47:48 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Siddhartha S (Gerrit)

        unread,
        May 19, 2026, 10:29:23 AMMay 19
        to José Dapena Paz, Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from José Dapena Paz

        Siddhartha S added 2 comments

        Patchset-level comments
        Siddhartha S . resolved

        Moving Will to reviewer.

        Will Harris . unresolved

        this is cool I did not know about this behavior of heap where the values were optional. this seems like a very reasonable approach to fix this issue. thank you!

        what are these data used for - is this going to change metrics in any way?

        Siddhartha S

        I believe the MemoryDumpLevelOfDetail::kDetailed should only be triggered on local tracing. so, this change should not impact chrome metrics, including any malloc related uma counters.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • José Dapena Paz
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
        Gerrit-Change-Number: 7816237
        Gerrit-PatchSet: 4
        Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
        Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
        Gerrit-CC: Will Harris <w...@chromium.org>
        Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
        Gerrit-Comment-Date: Tue, 19 May 2026 14:29:13 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Will Harris <w...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        José Dapena Paz (Gerrit)

        unread,
        May 26, 2026, 2:30:56 PMMay 26
        to Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Will Harris

        José Dapena Paz added 3 comments

        File base/trace_event/malloc_dump_provider.h
        Line 174, Patchset 4:BASE_EXPORT void WinHeapMemoryDumpImpl(void* heap, WinHeapInfo* info);
        Will Harris . unresolved

        `info` is a non-optional out param, so please use a ref here.

        José Dapena Paz

        As we always do the same:

        ```
        WinHeapInfo info;
        WinHeapMemoryDumpImpl(heap, &info);
        ```

        I will move to have a static in `WinHeapInfo` for creating it from the handle:

        ```
        WinHeapInfo WinHeapInfo::FromHandle(heap);
        ```

        File base/trace_event/malloc_dump_provider.cc
        Line 78, Patchset 4: reinterpret_cast<HANDLE>(_get_heap_handle()), &main_heap_info);
        Will Harris . resolved

        this is passing a HANDLE and yet the function takes a void* - can you fix?

        José Dapena Paz

        Done

        Line 315, Patchset 4: info->committed_size += heap_entry.cbData + heap_entry.cbOverhead;
        Will Harris . resolved

        cbData is DWORD 32-bit - should this be promoted to a `size_t` before the addition, so very large `cbData` sizes near the 32-bit boundary can't overflow?

        e.g.

        `static_cast<size_t>(heap_entry.cbData)`

        José Dapena Paz

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Will Harris
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
        Gerrit-Change-Number: 7816237
        Gerrit-PatchSet: 5
        Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
        Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
        Gerrit-CC: Will Harris <w...@chromium.org>
        Gerrit-Attention: Will Harris <w...@chromium.org>
        Gerrit-Comment-Date: Tue, 26 May 2026 18:30:45 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Will Harris (Gerrit)

        unread,
        May 26, 2026, 10:27:54 PMMay 26
        to José Dapena Paz, Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from José Dapena Paz

        Will Harris added 1 comment

        File base/trace_event/malloc_dump_provider.h
        Line 173, Patchset 5 (Latest): static BASE_EXPORT WinHeapInfo FromHandle(void* heap);
        Will Harris . unresolved

        if exposed for testing can you add `ForTesting` on the method name, so the static checks assert it's only called in tests.

        to support production code, add a new non-test only API that calls `_get_heap_handle`.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • José Dapena Paz
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
        Gerrit-Change-Number: 7816237
        Gerrit-PatchSet: 5
        Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
        Gerrit-Reviewer: Will Harris <w...@chromium.org>
        Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
        Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
        Gerrit-Comment-Date: Wed, 27 May 2026 02:27:45 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        José Dapena Paz (Gerrit)

        unread,
        May 27, 2026, 3:17:40 AMMay 27
        to Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Will Harris

        José Dapena Paz added 2 comments

        File base/trace_event/malloc_dump_provider.h
        Line 173, Patchset 5: static BASE_EXPORT WinHeapInfo FromHandle(void* heap);
        Will Harris . resolved

        if exposed for testing can you add `ForTesting` on the method name, so the static checks assert it's only called in tests.

        to support production code, add a new non-test only API that calls `_get_heap_handle`.

        José Dapena Paz

        Done

        Line 174, Patchset 4:BASE_EXPORT void WinHeapMemoryDumpImpl(void* heap, WinHeapInfo* info);
        Will Harris . resolved

        `info` is a non-optional out param, so please use a ref here.

        José Dapena Paz

        As we always do the same:

        ```
        WinHeapInfo info;
        WinHeapMemoryDumpImpl(heap, &info);
        ```

        I will move to have a static in `WinHeapInfo` for creating it from the handle:

        ```
        WinHeapInfo WinHeapInfo::FromHandle(heap);
        ```

        José Dapena Paz

        The approach for returning the value is done. And following the proposal below, the only public API is for testing. The internal API works already with HANDLE.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Will Harris
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
        Gerrit-Change-Number: 7816237
        Gerrit-PatchSet: 5
        Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
        Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
        Gerrit-Reviewer: Will Harris <w...@chromium.org>
        Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
        Gerrit-Attention: Will Harris <w...@chromium.org>
        Gerrit-Comment-Date: Wed, 27 May 2026 07:17:19 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Will Harris (Gerrit)

        unread,
        May 27, 2026, 11:38:48 AMMay 27
        to José Dapena Paz, Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from José Dapena Paz

        Will Harris voted and added 2 comments

        Votes added by Will Harris

        Code-Review+1

        2 comments

        Patchset-level comments
        File-level comment, Patchset 7 (Latest):
        Will Harris . resolved

        ty for the CL and the find.

        File base/trace_event/malloc_dump_provider.cc
        Line 113, Patchset 7 (Latest):internal::WinHeapInfo WinHeapInfoFromCRTHeap() {
        Will Harris . unresolved

        nit: no need for this function, you can call directly from production code

        but no problem keeping it either.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • José Dapena Paz
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
          Gerrit-Change-Number: 7816237
          Gerrit-PatchSet: 7
          Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
          Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
          Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
          Gerrit-Reviewer: Will Harris <w...@chromium.org>
          Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
          Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
          Gerrit-Comment-Date: Wed, 27 May 2026 15:38:31 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          José Dapena Paz (Gerrit)

          unread,
          May 29, 2026, 9:53:03 AM (13 days ago) May 29
          to Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

          José Dapena Paz added 1 comment

          File base/trace_event/malloc_dump_provider.cc
          Line 113, Patchset 7:internal::WinHeapInfo WinHeapInfoFromCRTHeap() {
          Will Harris . resolved

          nit: no need for this function, you can call directly from production code

          but no problem keeping it either.

          José Dapena Paz

          Done

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
          Gerrit-Change-Number: 7816237
          Gerrit-PatchSet: 8
          Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
          Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
          Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
          Gerrit-Reviewer: Will Harris <w...@chromium.org>
          Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
          Gerrit-Comment-Date: Fri, 29 May 2026 13:52:44 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Will Harris <w...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          José Dapena Paz (Gerrit)

          unread,
          May 29, 2026, 9:53:33 AM (13 days ago) May 29
          to Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
          Attention needed from Siddhartha S

          José Dapena Paz added 1 comment

          Patchset-level comments
          File-level comment, Patchset 4:
          Will Harris . resolved

          this is cool I did not know about this behavior of heap where the values were optional. this seems like a very reasonable approach to fix this issue. thank you!

          what are these data used for - is this going to change metrics in any way?

          Siddhartha S

          I believe the MemoryDumpLevelOfDetail::kDetailed should only be triggered on local tracing. so, this change should not impact chrome metrics, including any malloc related uma counters.

          José Dapena Paz

          No action needed in this ticket. Resolving.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Siddhartha S
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • 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: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
            Gerrit-Change-Number: 7816237
            Gerrit-PatchSet: 8
            Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
            Gerrit-Reviewer: Will Harris <w...@chromium.org>
            Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Siddhartha S <ss...@chromium.org>
            Gerrit-Comment-Date: Fri, 29 May 2026 13:53:17 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Will Harris <w...@chromium.org>
            Comment-In-Reply-To: Siddhartha S <ss...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            José Dapena Paz (Gerrit)

            unread,
            Jun 1, 2026, 12:36:55 PM (10 days ago) Jun 1
            to Etienne Pierre-Doray, Will Harris, Siddhartha S, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
            Attention needed from Etienne Pierre-Doray and Siddhartha S

            José Dapena Paz added 1 comment

            José Dapena Paz . resolved

            Expanding reviewer (owners) set as 3 files still need owner approval.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Etienne Pierre-Doray
            • Siddhartha S
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • 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: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
            Gerrit-Change-Number: 7816237
            Gerrit-PatchSet: 8
            Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
            Gerrit-Reviewer: Will Harris <w...@chromium.org>
            Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Attention: Siddhartha S <ss...@chromium.org>
            Gerrit-Comment-Date: Mon, 01 Jun 2026 16:36:37 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Siddhartha S (Gerrit)

            unread,
            Jun 1, 2026, 5:48:11 PM (9 days ago) Jun 1
            to José Dapena Paz, Siddhartha S, Etienne Pierre-Doray, Will Harris, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
            Attention needed from Etienne Pierre-Doray and José Dapena Paz

            Siddhartha S voted and added 1 comment

            Votes added by Siddhartha S

            Code-Review+1

            1 comment

            Patchset-level comments
            Siddhartha S . resolved

            sorry was ooo, lgtm stamp, since Will reviewed it in detail

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Etienne Pierre-Doray
            • José Dapena Paz
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement 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: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
            Gerrit-Change-Number: 7816237
            Gerrit-PatchSet: 8
            Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
            Gerrit-Reviewer: Will Harris <w...@chromium.org>
            Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Comment-Date: Mon, 01 Jun 2026 21:47:58 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            José Dapena Paz (Gerrit)

            unread,
            Jun 2, 2026, 2:06:41 AM (9 days ago) Jun 2
            to Siddhartha S, Etienne Pierre-Doray, Will Harris, Mikhail Khokhlov, Chromium LUCI CQ, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
            Attention needed from Etienne Pierre-Doray

            José Dapena Paz voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Etienne Pierre-Doray
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement 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: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
            Gerrit-Change-Number: 7816237
            Gerrit-PatchSet: 8
            Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
            Gerrit-Reviewer: Will Harris <w...@chromium.org>
            Gerrit-CC: Mikhail Khokhlov <khok...@google.com>
            Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Comment-Date: Tue, 02 Jun 2026 06:06:19 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Chromium LUCI CQ (Gerrit)

            unread,
            Jun 2, 2026, 3:43:41 AM (9 days ago) Jun 2
            to José Dapena Paz, Siddhartha S, Etienne Pierre-Doray, Will Harris, Mikhail Khokhlov, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

            Chromium LUCI CQ submitted the change

            Change information

            Commit message:
            Fix WinHeap accounting for large allocations

            HeapWalk reports normal heap regions as PROCESS_HEAP_REGION entries, but
            large allocations appear only as orphan busy entries outside any region.
            Without tracking those, the WinHeap dump under-reports committed memory
            in memory-infra traces.

            Count busy entries that fall outside any region as committed memory.
            Bug: 483623915, 483623913
            Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
            Reviewed-by: Will Harris <w...@chromium.org>
            Commit-Queue: José Dapena Paz <jda...@igalia.com>
            Reviewed-by: Siddhartha S <ss...@chromium.org>
            Cr-Commit-Position: refs/heads/main@{#1639985}
            Files:
            • M base/BUILD.gn
            • M base/trace_event/malloc_dump_provider.cc
            • M base/trace_event/malloc_dump_provider.h
            • A base/trace_event/malloc_dump_provider_unittest.cc
            Change size: M
            Delta: 4 files changed, 163 insertions(+), 24 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Will Harris, +1 by Siddhartha S
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ia44527cf894ba0a2b4501bfa31e4e7cea69c6fc0
            Gerrit-Change-Number: 7816237
            Gerrit-PatchSet: 9
            Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
            Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
            Gerrit-Reviewer: Siddhartha S <ss...@chromium.org>
            Gerrit-Reviewer: Will Harris <w...@chromium.org>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages