Reviewers: Toon Verwaest,

Description:
Merged r18483 into 3.22 branch.

Fix selection of popular pages in store buffer.

BUG=331444
LOG=N
[email protected]

Please review this at https://codereview.chromium.org/143783006/

SVN Base: https://v8.googlecode.com/svn/branches/3.22

Affected files (+16, -9 lines):
  M src/store-buffer.cc
  M src/version.cc
  A + test/mjsunit/regress/regress-331444.js


Index: src/store-buffer.cc
diff --git a/src/store-buffer.cc b/src/store-buffer.cc
index 22a546742c85f376839ef68528728cd69bb3cc53..e89eb1bfed4a6a3803858ec13cffface8cea3689 100644
--- a/src/store-buffer.cc
+++ b/src/store-buffer.cc
@@ -224,7 +224,7 @@ void StoreBuffer::ExemptPopularPages(int prime_sample_step, int threshold) {
       containing_chunk = MemoryChunk::FromAnyPointerAddress(heap_, addr);
     }
     int old_counter = containing_chunk->store_buffer_counter();
-    if (old_counter == threshold) {
+    if (old_counter >= threshold) {
       containing_chunk->set_scan_on_scavenge(true);
       created_new_scan_on_scavenge_pages = true;
     }
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index a9b85de92bc81c3261bd92267219fa9ca2fdcbe2..685fde02891a5f9aa721db7c8b7d2e059ab6fbcc 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     22
 #define BUILD_NUMBER      24
-#define PATCH_LEVEL       15
+#define PATCH_LEVEL       16
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0
Index: test/mjsunit/regress/regress-331444.js
diff --git a/test/mjsunit/compiler/regress-3.js b/test/mjsunit/regress/regress-331444.js
similarity index 84%
copy from test/mjsunit/compiler/regress-3.js
copy to test/mjsunit/regress/regress-331444.js
index 6aa7078ae8f9adc80f2ffc1ae07270f4806ef5c7..c78d6fb71b7c455abfcd1450d80b5c8a6dcb6e38 100644
--- a/test/mjsunit/compiler/regress-3.js
+++ b/test/mjsunit/regress/regress-331444.js
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -25,13 +25,20 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+// Flags: --expose-gc
+
+function boom() {
+  var args = [];
+  for (var i = 0; i < 125000; i++)
+    args.push(i);
+  return Array.apply(Array, args);
+}
+var array = boom();
 function fib(n) {
   var f0 = 0, f1 = 1;
-  for (; n > 0; n = n -1) {
-    var f2 = f0 + f1;
-    f0 = f1; f1 = f2;
+  for (; n > 0; n = n - 1) {
+    f0 + f1;
+    f0 = array;
   }
-  return f0;
 }
-
-assertEquals(2111485077978050, fib(75));
+fib(12);


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