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

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

Issue 290133004: Print promotion rate and semi-space copy rate in --trace-gc-nvp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | no next file » | 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "code-stubs.h" 7 #include "code-stubs.h"
8 #include "compilation-cache.h" 8 #include "compilation-cache.h"
9 #include "cpu-profiler.h" 9 #include "cpu-profiler.h"
10 #include "deoptimizer.h" 10 #include "deoptimizer.h"
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 } 2070 }
2071 allocation = new_space->AllocateRaw(size); 2071 allocation = new_space->AllocateRaw(size);
2072 ASSERT(!allocation.IsRetry()); 2072 ASSERT(!allocation.IsRetry());
2073 } 2073 }
2074 Object* target = allocation.ToObjectChecked(); 2074 Object* target = allocation.ToObjectChecked();
2075 2075
2076 MigrateObject(HeapObject::cast(target), 2076 MigrateObject(HeapObject::cast(target),
2077 object, 2077 object,
2078 size, 2078 size,
2079 NEW_SPACE); 2079 NEW_SPACE);
2080 heap()->IncrementSemiSpaceCopiedObjectSize(size);
2080 } 2081 }
2081 *cells = 0; 2082 *cells = 0;
2082 } 2083 }
2083 return survivors_size; 2084 return survivors_size;
2084 } 2085 }
2085 2086
2086 2087
2087 static void DiscoverGreyObjectsInSpace(Heap* heap, 2088 static void DiscoverGreyObjectsInSpace(Heap* heap,
2088 MarkingDeque* marking_deque, 2089 MarkingDeque* marking_deque,
2089 PagedSpace* space) { 2090 PagedSpace* space) {
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 3077
3077 ASSERT(target_space == heap()->old_pointer_space() || 3078 ASSERT(target_space == heap()->old_pointer_space() ||
3078 target_space == heap()->old_data_space()); 3079 target_space == heap()->old_data_space());
3079 HeapObject* target; 3080 HeapObject* target;
3080 AllocationResult allocation = target_space->AllocateRaw(object_size); 3081 AllocationResult allocation = target_space->AllocateRaw(object_size);
3081 if (allocation.To(&target)) { 3082 if (allocation.To(&target)) {
3082 MigrateObject(target, 3083 MigrateObject(target,
3083 object, 3084 object,
3084 object_size, 3085 object_size,
3085 target_space->identity()); 3086 target_space->identity());
3086 heap()->mark_compact_collector()->tracer()-> 3087 heap()->IncrementPromotedObjectsSize(object_size);
3087 increment_promoted_objects_size(object_size);
3088 return true; 3088 return true;
3089 } 3089 }
3090 3090
3091 return false; 3091 return false;
3092 } 3092 }
3093 3093
3094 3094
3095 void MarkCompactCollector::EvacuateNewSpace() { 3095 void MarkCompactCollector::EvacuateNewSpace() {
3096 // There are soft limits in the allocation code, designed trigger a mark 3096 // There are soft limits in the allocation code, designed trigger a mark
3097 // sweep collection by failing allocations. But since we are already in 3097 // sweep collection by failing allocations. But since we are already in
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
4532 while (buffer != NULL) { 4532 while (buffer != NULL) {
4533 SlotsBuffer* next_buffer = buffer->next(); 4533 SlotsBuffer* next_buffer = buffer->next();
4534 DeallocateBuffer(buffer); 4534 DeallocateBuffer(buffer);
4535 buffer = next_buffer; 4535 buffer = next_buffer;
4536 } 4536 }
4537 *buffer_address = NULL; 4537 *buffer_address = NULL;
4538 } 4538 }
4539 4539
4540 4540
4541 } } // namespace v8::internal 4541 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698