Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: src/heap/spaces.cc

Issue 1932883002: Revert "[heap] Optimize NewSpace::AllocatedSinceLastGC" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/full-codegen/full-codegen.h" 9 #include "src/full-codegen/full-codegen.h"
10 #include "src/heap/slot-set.h" 10 #include "src/heap/slot-set.h"
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 1490
1491 // Clear remainder of current page. 1491 // Clear remainder of current page.
1492 Address limit = Page::FromAllocationAreaAddress(top)->area_end(); 1492 Address limit = Page::FromAllocationAreaAddress(top)->area_end();
1493 if (heap()->gc_state() == Heap::SCAVENGE) { 1493 if (heap()->gc_state() == Heap::SCAVENGE) {
1494 heap()->promotion_queue()->SetNewLimit(limit); 1494 heap()->promotion_queue()->SetNewLimit(limit);
1495 } 1495 }
1496 1496
1497 int remaining_in_page = static_cast<int>(limit - top); 1497 int remaining_in_page = static_cast<int>(limit - top);
1498 heap()->CreateFillerObjectAt(top, remaining_in_page, ClearRecordedSlots::kNo); 1498 heap()->CreateFillerObjectAt(top, remaining_in_page, ClearRecordedSlots::kNo);
1499 pages_used_++; 1499 pages_used_++;
1500 allocated_since_last_gc_ += Page::kAllocatableMemory;
1501 UpdateAllocationInfo(); 1500 UpdateAllocationInfo();
1502 1501
1503 return true; 1502 return true;
1504 } 1503 }
1505 1504
1506 1505
1507 bool NewSpace::AddFreshPageSynchronized() { 1506 bool NewSpace::AddFreshPageSynchronized() {
1508 base::LockGuard<base::Mutex> guard(&mutex_); 1507 base::LockGuard<base::Mutex> guard(&mutex_);
1509 return AddFreshPage(); 1508 return AddFreshPage();
1510 } 1509 }
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3152 object->ShortPrint(); 3151 object->ShortPrint();
3153 PrintF("\n"); 3152 PrintF("\n");
3154 } 3153 }
3155 printf(" --------------------------------------\n"); 3154 printf(" --------------------------------------\n");
3156 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3155 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3157 } 3156 }
3158 3157
3159 #endif // DEBUG 3158 #endif // DEBUG
3160 } // namespace internal 3159 } // namespace internal
3161 } // namespace v8 3160 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698