Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
69357d0
http2: small fixes to compatibility layer
apapirovski Sep 19, 2017
670c2f4
http2: remove unused onTimeout, add timeout tests
apapirovski Sep 21, 2017
b5faadd
doc: note caveats in process message serialization
joyeecheung May 11, 2017
a872b97
http2: fix compat stream read handling, add tests
apapirovski Sep 21, 2017
dc07227
src: correct typo in trace_event header
danbev Sep 24, 2017
2603466
doc: remove invalid hash in link
vsemozhetbyt Sep 21, 2017
ab9d1e7
docs: clarify usage cli options -e,-p on windows
lukaszewczak Sep 23, 2017
119e05f
doc: ctc -> tsc in collab guide
bengl Sep 24, 2017
fa07b27
doc: ctc -> tsc in onboarding extras
bengl Sep 26, 2017
0bd64f1
doc: fix outdated code sample in n-api.md
rebornix Sep 24, 2017
00d0c51
path: fix normalize paths ending with two dots
targos Sep 26, 2017
8f07f00
2017-09-26, Node.js Version 8.6.0 (Current)
jasnell Sep 20, 2017
150a1c4
Working on v8.6.1
jasnell Sep 26, 2017
9325095
deps: update V8 to 6.1.534.36
targos Sep 13, 2017
e04b70a
deps: limit regress/regress-crbug-514081 v8 test
mhdawson May 9, 2016
5add5ff
deps: fix addons compilation with VS2013
bzoz May 23, 2017
7cad8dd
deps: cherry-pick f19b889 from upstream V8
targos Aug 16, 2017
015756c
deps: backport 6e9e2e5 from upstream V8
Aug 3, 2017
43adec7
deps: backport bca8409 from upstream V8
Aug 3, 2017
6c063f2
deps: backport f9c4b7a from upstream V8
Aug 3, 2017
d336d2a
deps: cherry-pick e020aae394 from V8 upstream
bnoordhuis Aug 17, 2017
fb3022f
deps: cherry-pick 1aead19 from upstream V8
bnoordhuis Aug 17, 2017
8032f8c
deps: add postmortem metadata for V8 TurboFan
targos Sep 6, 2017
aa22c86
src: fix SmartOS compilation
targos Jun 27, 2017
f290e5d
deps: patch V8 to 6.1.534.38
MylesBorins Sep 15, 2017
acd4696
deps: revert ABI breaking changes in V8 6.1
addaleax Sep 14, 2017
ae47f5b
deps: cherry-pick b6158eb6befae from V8 upstream
addaleax Sep 8, 2017
7fe48f8
deps: cherry-pick 9b21865822243 from V8 upstream
addaleax Sep 8, 2017
89db101
src: keep track of env properly in node_perf.cc
addaleax Sep 4, 2017
e6b64fa
src: use InstantiateModule instead of deprecated
danbev Sep 15, 2017
b785b35
src: remove unused static variable
bnoordhuis Sep 18, 2017
77103f7
src: handle uv_async_init() failure
bnoordhuis Sep 18, 2017
db1c65f
src: return references from getters, not copies
bnoordhuis Sep 18, 2017
f235f09
src: constify PerformanceEntry data members
bnoordhuis Sep 18, 2017
5992a31
url: change variable name to be more descriptive
jason9693 Sep 22, 2017
997ccdd
crypto: only try to set FIPS mode if different
gibfahn Apr 4, 2017
d8b4492
src: move node_trace_writer/buffer.h to agent.cc
danbev Sep 23, 2017
ccb8b0a
doc: update table of contents for common/README.md
Trott Sep 25, 2017
8993d93
async_hooks: consistent internal naming
AndreasMadsen Sep 26, 2017
528ebe1
src: clear async id stack if bootstrap throws
trevnorris Sep 22, 2017
2c08b32
build: add test-with-async-hooks
trevnorris Jun 20, 2017
c319ab0
test: print resource stack on error
trevnorris Jun 16, 2017
37208b1
test: skip test when checking async_hooks
trevnorris Jun 20, 2017
50f9bb3
async_wrap: add constructor for PromiseWrap
trevnorris Jun 14, 2017
e218c7b
async_wrap: allow user to pass execution_async_id
trevnorris Jun 14, 2017
9d2ab20
src: remove unused computation
cjihrig Sep 24, 2017
f702876
src: remove unused variable in node_url.cc
cjihrig Sep 24, 2017
f2fde76
test: fix http-writable-true-after-close flakyness
mcollina Sep 21, 2017
baeb46a
doc: retire bnoordhuis from the TSC
bnoordhuis Sep 26, 2017
70f60c9
doc: fix mistake in http2stream.respondWithFile.
antoine-amara Sep 18, 2017
aabd84d
src,etw: fix event 9 on 64 bit Windows
joaocgreis Sep 22, 2017
083077b
http: client keep-alive for UNIX domain sockets
bengl May 25, 2017
64d61d7
build: run es-module tests in CI
Sep 14, 2017
322f75e
build: fix shared installing target
yorkie Sep 2, 2017
01b54f7
crypto: use SSL_SESSION_get_id
davidben Sep 11, 2017
837fc99
crypto: use X509V3_EXT_d2i
davidben Sep 11, 2017
6a42c8f
doc: add callback function signatures in fs.md
matejkrajcovic Jun 2, 2017
d93e65d
doc: improve fs.utimes
refack Jul 10, 2017
3eef812
crypto: better crypto error messages
gla5001 Aug 10, 2017
4a7ac6f
deps: update V8 to 6.1.534.42
targos Sep 21, 2017
5b21109
src: fix typo in probe description
evanlucas Sep 13, 2017
7e8c0fd
tools, build: refactor macOS installer
jpwesselink Sep 4, 2017
54ee0ca
src: add help for NODE_PENDING_DEPRECATION env
tomc974 Sep 25, 2017
9248768
deps: cherry-pick 0353a1e from upstream V8
targos Sep 25, 2017
5eef728
doc: add bmeurer to collaborators
bmeurer Sep 29, 2017
8aafa9e
timers: warn on overflowed timeout duration
Fishrock123 May 24, 2016
482b0d7
doc: update libuv license
TimothyGu Sep 28, 2017
0043c25
src: remove unused using in node_trace_writer.h
danbev Sep 26, 2017
57df19b
url: fix remaining calculation
rmisev Sep 27, 2017
ae7811f
perf_hooks: remove docs for unimplemented API
sam-github Sep 27, 2017
fcd910f
doc: fix link in the test/README.md
rmisev Sep 27, 2017
bc14d0c
dgram: support for setting socket buffer size
DamienOReilly Jun 11, 2017
bcdfbc1
src: fix compiler warning in udp_wrap.cc
danbev Sep 14, 2017
e166bd7
doc: do not begin yaml value with backtick
maclover7 Sep 17, 2017
c6aaaf0
src: use UV_EINVAL instead of EINVAL in udp_wrap
danbev Sep 17, 2017
3142c25
dgram: refactor SO_RCVBUF and SO_SNDBUF methods
cjihrig Sep 20, 2017
62c2802
doc: standardize function param/object prop style
gibfahn Jun 18, 2017
547fe58
deps: update npm to 5.4.2
targos Sep 20, 2017
f72da3b
errors: remove duplicate error definition
maclover7 Sep 10, 2017
cbe5d7a
n-api: add check for large strings
mhdawson Sep 25, 2017
d954a82
doc: fix links in some intra-repository docs
vsemozhetbyt Sep 29, 2017
e4a06e6
src: remove unused includes in src/tracing
danbev Sep 29, 2017
5d4a947
test: fix test-https-writable-true-after-close
Trott Oct 1, 2017
1604eb7
test: update es-module.status prefix
jackhorton Sep 29, 2017
6ad3b9d
http2: adjust error emit in core, add tests
apapirovski Sep 30, 2017
a5baa25
test: http2Stream redundant shutdown and single cb
trivikr Sep 25, 2017
e26ed8d
url: const-ify APIs, and pass URL by ref
sam-github Sep 25, 2017
930809d
tty: require readline at top of file
bengl Sep 28, 2017
f623c63
test: make it easier to run tests for subsystems
Sep 29, 2017
71b2a5c
deps: V8: cherry-pick 163d360 from upstream
ofrobots Sep 28, 2017
7ae6132
stream: fix todo
BridgeAR Sep 28, 2017
3612490
doc: edit COLLABORATORS_GUIDE.md for readability
Trott Sep 26, 2017
1359cb9
test: Http2Stream destroy server before shutdown
trivikr Sep 25, 2017
b8c9a4c
stream: fix disparity between buffer and the count
jlvivero Sep 28, 2017
2c85d7c
http2: setting shuttingDown=true after validation
trivikr Sep 29, 2017
c6b65cc
doc: update fs.utimes{,Sync} changelog
lpinca Sep 29, 2017
8c7c7ad
test: check that this != new.target in addon
bnoordhuis Sep 29, 2017
898d8f9
doc: add missing TOC entry in CONTRIBUTING.md
vsemozhetbyt Oct 2, 2017
ac43f7b
src: fix windows-only build breakage
bnoordhuis Oct 2, 2017
fc7945d
doc: fix v8.6 changelog entry
BridgeAR Oct 1, 2017
d9832c8
doc: fix dead link in doc/releases.md
lpinca Oct 2, 2017
db1b305
doc: change encoding to decoding
thefourtheye Oct 1, 2017
30dd6ad
doc: alphabetize TSC Emeriti in README.md
Trott Oct 2, 2017
e271ccd
doc: add 'git clean -xfd' to backport guide
lance Oct 1, 2017
cd32563
doc: fix typo in tls.md
koh110 Oct 2, 2017
3608983
test: increase test coverage for os.js
viktor-ku Jul 6, 2017
f10e2f5
http2: simplify TypeName
jasnell Sep 29, 2017
470ef86
http2: refactor method arguments to avoid bools
jasnell Sep 29, 2017
7611ed5
http2: eliminate dead code
jasnell Sep 29, 2017
93f3d25
http2: making sending to the socket more efficient
jasnell Sep 29, 2017
ff4d0e2
async_hooks: fix reference in code comment
mscdex Oct 3, 2017
b22014e
util: deprecate obj.inspect for custom inspection
Trott Sep 26, 2017
8b120fe
fs: add O_DSYNC
Sep 15, 2017
9d97fcc
doc,test: minor improvements to O_DSYNC
tniessen Sep 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: backport 6e9e2e5 from upstream V8
Original commit message:

  [heap] Move SweeperTask to CancelableTask
  This mitigates the problem of blocking on the main thread when the
  platform is unable to execute background tasks in a timely manner.

  Bug: v8:6655
  Change-Id: Icdaae744ee73146b86b9a28c8035138746721971
  Reviewed-on: https://chromium-review.googlesource.com/595467
  Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
  Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#47036}

Backport-PR-URL: #15393
PR-URL: #14001
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
Matt Loring authored and MylesBorins committed Sep 29, 2017
commit 015756cf599a4e5723d04cec005ed0c561bb1690
40 changes: 25 additions & 15 deletions deps/v8/src/heap/mark-compact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "src/base/atomicops.h"
#include "src/base/bits.h"
#include "src/base/sys-info.h"
#include "src/cancelable-task.h"
#include "src/code-stubs.h"
#include "src/compilation-cache.h"
#include "src/deoptimizer.h"
Expand Down Expand Up @@ -569,21 +570,22 @@ void MarkCompactCollector::ClearMarkbits() {
heap_->lo_space()->ClearMarkingStateOfLiveObjects();
}

class MarkCompactCollector::Sweeper::SweeperTask : public v8::Task {
class MarkCompactCollector::Sweeper::SweeperTask final : public CancelableTask {
public:
SweeperTask(Sweeper* sweeper, base::Semaphore* pending_sweeper_tasks,
SweeperTask(Isolate* isolate, Sweeper* sweeper,
base::Semaphore* pending_sweeper_tasks,
base::AtomicNumber<intptr_t>* num_sweeping_tasks,
AllocationSpace space_to_start)
: sweeper_(sweeper),
: CancelableTask(isolate),
sweeper_(sweeper),
pending_sweeper_tasks_(pending_sweeper_tasks),
num_sweeping_tasks_(num_sweeping_tasks),
space_to_start_(space_to_start) {}

virtual ~SweeperTask() {}

private:
// v8::Task overrides.
void Run() override {
void RunInternal() final {
DCHECK_GE(space_to_start_, FIRST_SPACE);
DCHECK_LE(space_to_start_, LAST_PAGED_SPACE);
const int offset = space_to_start_ - FIRST_SPACE;
Expand All @@ -598,9 +600,9 @@ class MarkCompactCollector::Sweeper::SweeperTask : public v8::Task {
pending_sweeper_tasks_->Signal();
}

Sweeper* sweeper_;
base::Semaphore* pending_sweeper_tasks_;
base::AtomicNumber<intptr_t>* num_sweeping_tasks_;
Sweeper* const sweeper_;
base::Semaphore* const pending_sweeper_tasks_;
base::AtomicNumber<intptr_t>* const num_sweeping_tasks_;
AllocationSpace space_to_start_;

DISALLOW_COPY_AND_ASSIGN(SweeperTask);
Expand All @@ -618,15 +620,19 @@ void MarkCompactCollector::Sweeper::StartSweeping() {
}

void MarkCompactCollector::Sweeper::StartSweeperTasks() {
DCHECK_EQ(0, num_tasks_);
DCHECK_EQ(0, num_sweeping_tasks_.Value());
if (FLAG_concurrent_sweeping && sweeping_in_progress_) {
ForAllSweepingSpaces([this](AllocationSpace space) {
if (space == NEW_SPACE) return;
num_sweeping_tasks_.Increment(1);
semaphore_counter_++;
SweeperTask* task = new SweeperTask(heap_->isolate(), this,
&pending_sweeper_tasks_semaphore_,
&num_sweeping_tasks_, space);
DCHECK_LT(num_tasks_, kMaxSweeperTasks);
task_ids_[num_tasks_++] = task->id();
V8::GetCurrentPlatform()->CallOnBackgroundThread(
new SweeperTask(this, &pending_sweeper_tasks_semaphore_,
&num_sweeping_tasks_, space),
v8::Platform::kShortRunningTask);
task, v8::Platform::kShortRunningTask);
});
}
}
Expand Down Expand Up @@ -671,10 +677,14 @@ void MarkCompactCollector::Sweeper::EnsureCompleted() {
[this](AllocationSpace space) { ParallelSweepSpace(space, 0); });

if (FLAG_concurrent_sweeping) {
while (semaphore_counter_ > 0) {
pending_sweeper_tasks_semaphore_.Wait();
semaphore_counter_--;
for (int i = 0; i < num_tasks_; i++) {
if (heap_->isolate()->cancelable_task_manager()->TryAbort(task_ids_[i]) !=
CancelableTaskManager::kTaskAborted) {
pending_sweeper_tasks_semaphore_.Wait();
}
}
num_tasks_ = 0;
num_sweeping_tasks_.SetValue(0);
}

ForAllSweepingSpaces([this](AllocationSpace space) {
Expand Down
13 changes: 7 additions & 6 deletions deps/v8/src/heap/mark-compact.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,6 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {

class Sweeper {
public:
class SweeperTask;

enum FreeListRebuildingMode { REBUILD_FREE_LIST, IGNORE_FREE_LIST };
enum ClearOldToNewSlotsMode {
DO_NOT_CLEAR,
Expand All @@ -508,8 +506,8 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {

explicit Sweeper(Heap* heap)
: heap_(heap),
num_tasks_(0),
pending_sweeper_tasks_semaphore_(0),
semaphore_counter_(0),
sweeping_in_progress_(false),
num_sweeping_tasks_(0) {}

Expand All @@ -535,7 +533,10 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
Page* GetSweptPageSafe(PagedSpace* space);

private:
class SweeperTask;

static const int kAllocationSpaces = LAST_PAGED_SPACE + 1;
static const int kMaxSweeperTasks = kAllocationSpaces;

static ClearOldToNewSlotsMode GetClearOldToNewSlotsMode(Page* p);

Expand All @@ -550,10 +551,10 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {

void PrepareToBeSweptPage(AllocationSpace space, Page* page);

Heap* heap_;
Heap* const heap_;
int num_tasks_;
uint32_t task_ids_[kMaxSweeperTasks];
base::Semaphore pending_sweeper_tasks_semaphore_;
// Counter is only used for waiting on the semaphore.
intptr_t semaphore_counter_;
base::Mutex mutex_;
SweptList swept_list_[kAllocationSpaces];
SweepingList sweeping_list_[kAllocationSpaces];
Expand Down