Commit 1c819ae0 authored by Ali Ijaz Sheikh's avatar Ali Ijaz Sheikh Committed by Commit Bot

Reland "[heap] minor cleanup in allocation observer code"

This is a reland of 86da38fd
Original change's description:
> [heap] minor cleanup in allocation observer code
> 
> Change-Id: If0bec38d41a415e9fbfff57ac891de0461bac13b
> Reviewed-on: https://chromium-review.googlesource.com/668836
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
> Cr-Commit-Position: refs/heads/master@{#48046}

Change-Id: If5fd9f7d123a62672d5a4450ddeac5a6e29158b8
Reviewed-on: https://chromium-review.googlesource.com/675423
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-by: 's avatarAli Ijaz Sheikh <ofrobots@google.com>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49786}
parent c010a381
......@@ -1653,7 +1653,7 @@ Address PagedSpace::ComputeLimit(Address start, Address end,
// Keep the linear allocation area to fit exactly the requested size.
return start + size_in_bytes;
} else if (!allocation_observers_paused_ && !allocation_observers_.empty() &&
identity() == OLD_SPACE && !is_local()) {
SupportsInlineAllocation()) {
// Generated code may allocate inline from the linear allocation area for
// Old Space. To make sure we can observe these allocations, we use a lower
// limit.
......
......@@ -2232,7 +2232,9 @@ class V8_EXPORT_PRIVATE PagedSpace : NON_EXPORTED_BASE(public Space) {
}
void DecreaseLimit(Address new_limit);
void StartNextInlineAllocationStep() override;
bool SupportsInlineAllocation() { return identity() == OLD_SPACE; }
bool SupportsInlineAllocation() {
return identity() == OLD_SPACE && !is_local();
}
protected:
// PagedSpaces that should be included in snapshots have different, i.e.,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment