Revision: 21260
Author: [email protected]
Date: Mon May 12 10:39:08 2014 UTC
Log: Fix %SetFlags("--stress-compaction")
BUG=369943
LOG=N
[email protected]
Review URL: https://codereview.chromium.org/261253006
http://code.google.com/p/v8/source/detail?r=21260
Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-set-flags-stress-compact.js
Modified:
/branches/bleeding_edge/src/spaces-inl.h
=======================================
--- /dev/null
+++
/branches/bleeding_edge/test/mjsunit/regress/regress-set-flags-stress-compact.js
Mon May 12 10:39:08 2014 UTC
@@ -0,0 +1,10 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+%SetFlags("--gc-interval=164 --stress-compaction");
+
+var a = [];
+for (var i = 0; i < 10000; i++) { a[i * 100] = 0; }
=======================================
--- /branches/bleeding_edge/src/spaces-inl.h Wed Apr 30 12:25:18 2014 UTC
+++ /branches/bleeding_edge/src/spaces-inl.h Mon May 12 10:39:08 2014 UTC
@@ -290,21 +290,6 @@
AllocationResult NewSpace::AllocateRaw(int size_in_bytes) {
Address old_top = allocation_info_.top();
-#ifdef DEBUG
- // If we are stressing compaction we waste some memory in new space
- // in order to get more frequent GCs.
- if (FLAG_stress_compaction && !heap()->linear_allocation()) {
- if (allocation_info_.limit() - old_top >= size_in_bytes * 4) {
- int filler_size = size_in_bytes * 4;
- for (int i = 0; i < filler_size; i += kPointerSize) {
- *(reinterpret_cast<Object**>(old_top + i)) =
- heap()->one_pointer_filler_map();
- }
- old_top += filler_size;
- allocation_info_.set_top(allocation_info_.top() + filler_size);
- }
- }
-#endif
if (allocation_info_.limit() - old_top < size_in_bytes) {
return SlowAllocateRaw(size_in_bytes);
--
--
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/d/optout.