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

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

Issue 2861763002: [heap] Add GC accounting to slow allocation and incremental marking job (Closed)
Patch Set: Fix typo Created 3 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/counters.h ('k') | src/heap/incremental-marking-job.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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 int remaining_in_page = static_cast<int>(page->area_end() - to_top); 971 int remaining_in_page = static_cast<int>(page->area_end() - to_top);
972 CreateFillerObjectAt(to_top, remaining_in_page, ClearRecordedSlots::kNo); 972 CreateFillerObjectAt(to_top, remaining_in_page, ClearRecordedSlots::kNo);
973 } 973 }
974 } 974 }
975 975
976 bool Heap::CollectGarbage(GarbageCollector collector, 976 bool Heap::CollectGarbage(GarbageCollector collector,
977 GarbageCollectionReason gc_reason, 977 GarbageCollectionReason gc_reason,
978 const char* collector_reason, 978 const char* collector_reason,
979 const v8::GCCallbackFlags gc_callback_flags) { 979 const v8::GCCallbackFlags gc_callback_flags) {
980 // The VM is in the GC state until exiting this function. 980 // The VM is in the GC state until exiting this function.
981 VMState<GC> state(isolate_); 981 VMState<GC> state(isolate());
982 RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GC); 982 RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GC);
983 983
984 #ifdef DEBUG 984 #ifdef DEBUG
985 // Reset the allocation timeout to the GC interval, but make sure to 985 // Reset the allocation timeout to the GC interval, but make sure to
986 // allow at least a few allocations after a collection. The reason 986 // allow at least a few allocations after a collection. The reason
987 // for this is that we have a lot of allocation sequences and we 987 // for this is that we have a lot of allocation sequences and we
988 // assume that a garbage collection will allow the subsequent 988 // assume that a garbage collection will allow the subsequent
989 // allocation attempts to go through. 989 // allocation attempts to go through.
990 allocation_timeout_ = Max(6, FLAG_gc_interval); 990 allocation_timeout_ = Max(6, FLAG_gc_interval);
991 #endif 991 #endif
(...skipping 5387 matching lines...) Expand 10 before | Expand all | Expand 10 after
6379 case LO_SPACE: 6379 case LO_SPACE:
6380 return "LO_SPACE"; 6380 return "LO_SPACE";
6381 default: 6381 default:
6382 UNREACHABLE(); 6382 UNREACHABLE();
6383 } 6383 }
6384 return NULL; 6384 return NULL;
6385 } 6385 }
6386 6386
6387 } // namespace internal 6387 } // namespace internal
6388 } // namespace v8 6388 } // namespace v8
OLDNEW
« no previous file with comments | « src/counters.h ('k') | src/heap/incremental-marking-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698