Revision: 14974
Author: [email protected]
Date: Thu Jun 6 05:24:05 2013
Log: Revert "Make more GCs in idle notification handler." because of
performance
regression.
[email protected]
BUG=246141
Review URL: https://chromiumcodereview.appspot.com/15864010
http://code.google.com/p/v8/source/detail?r=14974
Modified:
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/heap.h
=======================================
--- /branches/bleeding_edge/src/heap.cc Wed Jun 5 01:43:25 2013
+++ /branches/bleeding_edge/src/heap.cc Thu Jun 6 05:24:05 2013
@@ -151,6 +151,7 @@
last_idle_notification_gc_count_(0),
last_idle_notification_gc_count_init_(false),
mark_sweeps_since_idle_round_started_(0),
+ ms_count_at_last_idle_notification_(0),
gc_count_at_last_idle_gc_(0),
scavenges_since_last_idle_round_(kIdleScavengeThreshold),
gcs_since_last_deopt_(0),
@@ -5707,7 +5708,6 @@
uncommit = true;
}
CollectAllGarbage(kNoGCFlags, "idle notification: finalize
incremental");
- mark_sweeps_since_idle_round_started_++;
gc_count_at_last_idle_gc_ = gc_count_;
if (uncommit) {
new_space_.Shrink();
@@ -5782,10 +5782,19 @@
return true;
}
}
+
+ int new_mark_sweeps = ms_count_ - ms_count_at_last_idle_notification_;
+ mark_sweeps_since_idle_round_started_ += new_mark_sweeps;
+ ms_count_at_last_idle_notification_ = ms_count_;
int remaining_mark_sweeps = kMaxMarkSweepsInIdleRound -
mark_sweeps_since_idle_round_started_;
+ if (remaining_mark_sweeps <= 0) {
+ FinishIdleRound();
+ return true;
+ }
+
if (incremental_marking()->IsStopped()) {
// If there are no more than two GCs left in this idle round and we are
// allowed to do a full GC, then make those GCs full in order to
compact
@@ -5795,7 +5804,6 @@
if (remaining_mark_sweeps <= 2 && hint >= kMinHintForFullGC) {
CollectAllGarbage(kReduceMemoryFootprintMask,
"idle notification: finalize idle round");
- mark_sweeps_since_idle_round_started_++;
} else {
incremental_marking()->Start();
}
@@ -5803,12 +5811,6 @@
if (!incremental_marking()->IsStopped()) {
AdvanceIdleIncrementalMarking(step_size);
}
-
- if (mark_sweeps_since_idle_round_started_ >= kMaxMarkSweepsInIdleRound) {
- FinishIdleRound();
- return true;
- }
-
return false;
}
=======================================
--- /branches/bleeding_edge/src/heap.h Tue Jun 4 10:20:06 2013
+++ /branches/bleeding_edge/src/heap.h Thu Jun 6 05:24:05 2013
@@ -2261,6 +2261,7 @@
void StartIdleRound() {
mark_sweeps_since_idle_round_started_ = 0;
+ ms_count_at_last_idle_notification_ = ms_count_;
}
void FinishIdleRound() {
@@ -2337,6 +2338,7 @@
bool last_idle_notification_gc_count_init_;
int mark_sweeps_since_idle_round_started_;
+ int ms_count_at_last_idle_notification_;
unsigned int gc_count_at_last_idle_gc_;
int scavenges_since_last_idle_round_;
--
--
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.