Reviewers: Michael Starzinger, ulan,
Description:
Enable incremental marking when --expose-gc is turned on.
BUG=
Please review this at https://codereview.chromium.org/139343007/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+11, -14 lines):
M src/extensions/gc-extension.cc
M src/heap.cc
M src/incremental-marking.cc
M src/mark-compact.cc
Index: src/extensions/gc-extension.cc
diff --git a/src/extensions/gc-extension.cc b/src/extensions/gc-extension.cc
index
1b5fb5d8c47768e00d85ccf8b20f5da95decc817..c79024939250f975e481e378d5eaa7fb43f8548d
100644
--- a/src/extensions/gc-extension.cc
+++ b/src/extensions/gc-extension.cc
@@ -45,8 +45,8 @@ void GCExtension::GC(const
v8::FunctionCallbackInfo<v8::Value>& args) {
isolate->heap()->CollectGarbage(
NEW_SPACE, "gc extension", v8::kGCCallbackFlagForced);
} else {
- isolate->heap()->CollectAllGarbage(
- Heap::kNoGCFlags, "gc extension", v8::kGCCallbackFlagForced);
+ isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask,
+ "gc extension", v8::kGCCallbackFlagForced);
}
}
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index
8b033d60afb1af728db37b2bb7808a311d1fe151..26afb4d403a541788b93bc71650ecbe72a4133ab
100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -5603,11 +5603,11 @@ bool Heap::IdleNotification(int hint) {
if (contexts_disposed_ > 0) {
contexts_disposed_ = 0;
int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
- if (hint >= mark_sweep_time && !FLAG_expose_gc &&
- incremental_marking()->IsStopped()) {
+ if (hint >= mark_sweep_time) {
HistogramTimerScope scope(isolate_->counters()->gc_context());
- CollectAllGarbage(kReduceMemoryFootprintMask,
- "idle notification: contexts disposed");
+ CollectAllGarbage(
+ kReduceMemoryFootprintMask | kAbortIncrementalMarkingMask,
+ "idle notification: contexts disposed");
} else {
AdvanceIdleIncrementalMarking(step_size);
}
@@ -5619,7 +5619,7 @@ bool Heap::IdleNotification(int hint) {
return false;
}
- if (!FLAG_incremental_marking || FLAG_expose_gc ||
Serializer::enabled()) {
+ if (!FLAG_incremental_marking || Serializer::enabled()) {
return IdleGlobalGC();
}
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index
4223dde211e4030b858c6fbe87816107642ac638..1b9a28a5b7d824f193778cb94ef8f2dc550bb466
100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -498,12 +498,10 @@ bool IncrementalMarking::WorthActivating() {
// debug tests run with incremental marking and some without.
static const intptr_t kActivationThreshold = 0;
#endif
- // Only start incremental marking in a safe state: 1) when expose GC is
- // deactivated, 2) when incremental marking is turned on, 3) when we are
- // currently not in a GC, and 4) when we are currently not serializing
- // or deserializing the heap.
- return !FLAG_expose_gc &&
- FLAG_incremental_marking &&
+ // Only start incremental marking in a safe state: 1) when incremental
+ // marking is turned on, 2) when we are currently not in a GC, and
+ // 3) when we are currently not serializing or deserializing the heap.
+ return FLAG_incremental_marking &&
FLAG_incremental_marking_steps &&
heap_->gc_state() == Heap::NOT_IN_GC &&
!Serializer::enabled() &&
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
7a76d1b334c4165e7e189713a908e982415e3046..45642c1dff3abff6ddaaae93ee512764ec119ed3
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -4121,7 +4121,6 @@ void MarkCompactCollector::SweepSpaces() {
if (FLAG_parallel_sweeping) how_to_sweep = PARALLEL_CONSERVATIVE;
if (FLAG_concurrent_sweeping) how_to_sweep = CONCURRENT_CONSERVATIVE;
}
- if (FLAG_expose_gc) how_to_sweep = CONSERVATIVE;
if (sweep_precisely_) how_to_sweep = PRECISE;
// Unlink evacuation candidates before sweeper threads access the list of
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.