Revision: 15550
Author:   [email protected]
Date:     Mon Jul  8 04:51:34 2013
Log:      Fix early exit condition for LowMemoryNotification.

When computing next_gc_likely_to_collect_more do not take into account already
free nodes in PostGarbageCollectionProcessing.

This reduces the number of full GC in LowMemoryNotification from 7 to ~2.

[email protected]

Review URL: https://chromiumcodereview.appspot.com/18834002
http://code.google.com/p/v8/source/detail?r=15550

Modified:
 /branches/bleeding_edge/src/global-handles.cc

=======================================
--- /branches/bleeding_edge/src/global-handles.cc       Mon Jul  8 04:29:55 2013
+++ /branches/bleeding_edge/src/global-handles.cc       Mon Jul  8 04:51:34 2013
@@ -634,6 +634,11 @@
     for (int i = 0; i < new_space_nodes_.length(); ++i) {
       Node* node = new_space_nodes_[i];
       ASSERT(node->is_in_new_space_list());
+      if (!node->IsRetainer()) {
+ // Free nodes do not have weak callbacks. Do not use them to compute
+        // the next_gc_likely_to_collect_more.
+        continue;
+      }
       // Skip dependent handles. Their weak callbacks might expect to be
       // called between two global garbage collection callbacks which
       // are not called for minor collections.
@@ -656,6 +661,11 @@
     }
   } else {
     for (NodeIterator it(this); !it.done(); it.Advance()) {
+      if (!it.node()->IsRetainer()) {
+ // Free nodes do not have weak callbacks. Do not use them to compute
+        // the next_gc_likely_to_collect_more.
+        continue;
+      }
       it.node()->clear_partially_dependent();
       if (it.node()->PostGarbageCollectionProcessing(isolate_)) {
if (initial_post_gc_processing_count != post_gc_processing_count_) {

--
--
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.


Reply via email to