New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 809647 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Feature request: v8 allocations should use memory tag 255

Project Member Reported by erikc...@chromium.org, Feb 6 2018

Issue description

Prior to unification of memory management of v8 and blink, PA used memory tag 254 and v8 used memory tag 255. This was helpful for debugging memory issues.

Now, they both use memory tag 254.
 
Cc: ajwong@chromium.org
One solution would be to add a 'memory_tag' parameter to AllocPages, after the 'commit' parameter, and defaulted to 254 (mac) or 0 (all others).

Then the gin PageAllocator could call this with 255 on Mac.

Another possibility is to add an overload of AllocPages with the extra parameter, which V8 would use. Then we wouldn't have to change AllocPages.
I like the latter approach. In the future, we may want to tag oilpan allocations with a different tag [rather than lumping it in with PA].

Comment 3 by bbudge@google.com, Feb 7 2018

I took the first approach - the tag parameter has to be passed into a bunch of helpers anyway.
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0d5e03205385980667caaf2ee8a1fb30e55b35f

commit b0d5e03205385980667caaf2ee8a1fb30e55b35f
Author: Bill Budge <bbudge@chromium.org>
Date: Mon Feb 12 22:35:04 2018

[page_allocator] Support memory page tagging.

- Adds a PageTag enum with values for Chromium and V8.
- Adds a page_tag parameter to base::AllocPages. Only
  tags on Mac OSX.

Bug:  chromium:809647 
Change-Id: Ifbe4df471eb9877e6c7a60908cce878932c4ccc5
Reviewed-on: https://chromium-review.googlesource.com/905517
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536218}
[modify] https://crrev.com/b0d5e03205385980667caaf2ee8a1fb30e55b35f/base/allocator/partition_allocator/page_allocator.cc
[modify] https://crrev.com/b0d5e03205385980667caaf2ee8a1fb30e55b35f/base/allocator/partition_allocator/page_allocator.h
[modify] https://crrev.com/b0d5e03205385980667caaf2ee8a1fb30e55b35f/gin/array_buffer.cc
[modify] https://crrev.com/b0d5e03205385980667caaf2ee8a1fb30e55b35f/gin/v8_platform.cc
[modify] https://crrev.com/b0d5e03205385980667caaf2ee8a1fb30e55b35f/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.cpp

Comment 5 by bbudge@chromium.org, Feb 15 2018

Status: Fixed (was: Assigned)

Sign in to add a comment