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

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

Issue 1125193005: Make new space allocation throughput estimation more accurate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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/v8.h" 5 #include "src/v8.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.h" 9 #include "src/full-codegen.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 initial_total_capacity_ = RoundDown(initial_capacity, Page::kPageSize); 1563 initial_total_capacity_ = RoundDown(initial_capacity, Page::kPageSize);
1564 total_capacity_ = initial_capacity; 1564 total_capacity_ = initial_capacity;
1565 target_capacity_ = RoundDown(target_capacity, Page::kPageSize); 1565 target_capacity_ = RoundDown(target_capacity, Page::kPageSize);
1566 maximum_total_capacity_ = RoundDown(maximum_capacity, Page::kPageSize); 1566 maximum_total_capacity_ = RoundDown(maximum_capacity, Page::kPageSize);
1567 maximum_committed_ = 0; 1567 maximum_committed_ = 0;
1568 committed_ = false; 1568 committed_ = false;
1569 start_ = start; 1569 start_ = start;
1570 address_mask_ = ~(maximum_capacity - 1); 1570 address_mask_ = ~(maximum_capacity - 1);
1571 object_mask_ = address_mask_ | kHeapObjectTagMask; 1571 object_mask_ = address_mask_ | kHeapObjectTagMask;
1572 object_expected_ = reinterpret_cast<uintptr_t>(start) | kHeapObjectTag; 1572 object_expected_ = reinterpret_cast<uintptr_t>(start) | kHeapObjectTag;
1573 age_mark_ = start_; 1573 age_mark_ = start_ + NewSpacePage::kObjectStartOffset;
1574 } 1574 }
1575 1575
1576 1576
1577 void SemiSpace::TearDown() { 1577 void SemiSpace::TearDown() {
1578 start_ = NULL; 1578 start_ = NULL;
1579 total_capacity_ = 0; 1579 total_capacity_ = 0;
1580 } 1580 }
1581 1581
1582 1582
1583 bool SemiSpace::Commit() { 1583 bool SemiSpace::Commit() {
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 object->ShortPrint(); 3127 object->ShortPrint();
3128 PrintF("\n"); 3128 PrintF("\n");
3129 } 3129 }
3130 printf(" --------------------------------------\n"); 3130 printf(" --------------------------------------\n");
3131 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3131 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3132 } 3132 }
3133 3133
3134 #endif // DEBUG 3134 #endif // DEBUG
3135 } 3135 }
3136 } // namespace v8::internal 3136 } // namespace v8::internal
OLDNEW
« src/heap/spaces.h ('K') | « src/heap/spaces.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698