Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5787f53

Browse filesBrowse files
targosgibfahn
authored andcommitted
deps: cherry-pick 2c75616 from upstream V8
Original commit message: [heap] Ensure progress in unmapping memory chunks. If sweeping is not making progress and there are many young generation GCs happening, then this can lead to accumulation of memory chunks in the unmapper queue. Bug: chromium:771966 Change-Id: Ief73ada0d17198a80b668850c6d2e7ea413113e7 Reviewed-on: https://chromium-review.googlesource.com/702479 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#48312} Refs: v8/v8@2c75616 Refs: nodejs/help#917 (comment) Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=771966 PR-URL: #16490 Backport-PR-URL: #16569 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent d6619b9 commit 5787f53
Copy full SHA for 5787f53

File tree

Expand file treeCollapse file tree

3 files changed

+12
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-1
lines changed
Open diff view settings
Collapse file

‎deps/v8/include/v8-version.h‎

Copy file name to clipboardExpand all lines: deps/v8/include/v8-version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 6
1212
#define V8_MINOR_VERSION 1
1313
#define V8_BUILD_NUMBER 534
14-
#define V8_PATCH_LEVEL 42
14+
#define V8_PATCH_LEVEL 43
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)
Collapse file

‎deps/v8/src/heap/heap.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/heap/heap.cc
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,12 @@ void Heap::Scavenge() {
17161716
IncrementalMarking::PauseBlackAllocationScope pause_black_allocation(
17171717
incremental_marking());
17181718

1719+
if (mark_compact_collector()->sweeper().sweeping_in_progress() &&
1720+
memory_allocator_->unmapper()->NumberOfDelayedChunks() >
1721+
kMaxSemiSpaceSizeInKB / Page::kPageSize) {
1722+
mark_compact_collector()->EnsureSweepingCompleted();
1723+
}
1724+
17191725
mark_compact_collector()->sweeper().EnsureNewSpaceCompleted();
17201726

17211727
SetGCState(SCAVENGE);
Collapse file

‎deps/v8/src/heap/spaces.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/heap/spaces.h
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,11 @@ class V8_EXPORT_PRIVATE MemoryAllocator {
12261226

12271227
bool has_delayed_chunks() { return delayed_regular_chunks_.size() > 0; }
12281228

1229+
int NumberOfDelayedChunks() {
1230+
base::LockGuard<base::Mutex> guard(&mutex_);
1231+
return static_cast<int>(delayed_regular_chunks_.size());
1232+
}
1233+
12291234
private:
12301235
static const int kReservedQueueingSlots = 64;
12311236
static const int kMaxUnmapperTasks = 24;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.