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

Side by Side Diff: src/heap/mark-compact.cc

Issue 1167563005: Make old generation allocation throughput stats independent from the new space allocation throughpu… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cast Created 5 years, 6 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/heap.cc ('k') | test/cctest/test-heap.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 DCHECK(p->area_size() == area_size); 670 DCHECK(p->area_size() == area_size);
671 int live_bytes = 671 int live_bytes =
672 p->WasSwept() ? p->LiveBytesFromFreeList() : p->LiveBytes(); 672 p->WasSwept() ? p->LiveBytesFromFreeList() : p->LiveBytes();
673 pages.push_back(std::make_pair(live_bytes, p)); 673 pages.push_back(std::make_pair(live_bytes, p));
674 } 674 }
675 675
676 int candidate_count = 0; 676 int candidate_count = 0;
677 int total_live_bytes = 0; 677 int total_live_bytes = 0;
678 678
679 bool reduce_memory = 679 bool reduce_memory =
680 reduce_memory_footprint_ || 680 reduce_memory_footprint_ || heap()->HasLowAllocationRate();
681 heap()->HasLowAllocationRate(
682 heap()->tracer()->CurrentAllocationThroughputInBytesPerMillisecond());
683 if (FLAG_manual_evacuation_candidates_selection) { 681 if (FLAG_manual_evacuation_candidates_selection) {
684 for (size_t i = 0; i < pages.size(); i++) { 682 for (size_t i = 0; i < pages.size(); i++) {
685 Page* p = pages[i].second; 683 Page* p = pages[i].second;
686 if (p->IsFlagSet(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING)) { 684 if (p->IsFlagSet(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING)) {
687 candidate_count++; 685 candidate_count++;
688 total_live_bytes += pages[i].first; 686 total_live_bytes += pages[i].first;
689 p->ClearFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING); 687 p->ClearFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
690 AddEvacuationCandidate(p); 688 AddEvacuationCandidate(p);
691 } 689 }
692 } 690 }
(...skipping 4039 matching lines...) Expand 10 before | Expand all | Expand 10 after
4732 SlotsBuffer* buffer = *buffer_address; 4730 SlotsBuffer* buffer = *buffer_address;
4733 while (buffer != NULL) { 4731 while (buffer != NULL) {
4734 SlotsBuffer* next_buffer = buffer->next(); 4732 SlotsBuffer* next_buffer = buffer->next();
4735 DeallocateBuffer(buffer); 4733 DeallocateBuffer(buffer);
4736 buffer = next_buffer; 4734 buffer = next_buffer;
4737 } 4735 }
4738 *buffer_address = NULL; 4736 *buffer_address = NULL;
4739 } 4737 }
4740 } // namespace internal 4738 } // namespace internal
4741 } // namespace v8 4739 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698