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

Side by Side Diff: runtime/vm/heap.cc

Issue 245773002: Invoke the GC prolog and epilog callbacks during new gen GC too. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | « no previous file | 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/heap.h" 5 #include "vm/heap.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 class_table->ResetCountersOld(); 256 class_table->ResetCountersOld();
257 } 257 }
258 } 258 }
259 259
260 260
261 void Heap::CollectGarbage(Space space) { 261 void Heap::CollectGarbage(Space space) {
262 if (space == kOld) { 262 if (space == kOld) {
263 CollectGarbage(space, kInvokeApiCallbacks, kOldSpace); 263 CollectGarbage(space, kInvokeApiCallbacks, kOldSpace);
264 } else { 264 } else {
265 ASSERT(space == kNew); 265 ASSERT(space == kNew);
266 CollectGarbage(space, kIgnoreApiCallbacks, kNewSpace); 266 CollectGarbage(space, kInvokeApiCallbacks, kNewSpace);
267 } 267 }
268 } 268 }
269 269
270 270
271 void Heap::CollectAllGarbage() { 271 void Heap::CollectAllGarbage() {
272 Isolate* isolate = Isolate::Current(); 272 Isolate* isolate = Isolate::Current();
273 TIMERSCOPE(isolate, time_gc); 273 TIMERSCOPE(isolate, time_gc);
274 { 274 {
275 VMTagScope tagScope(isolate, VMTag::kGCNewSpaceTagId); 275 VMTagScope tagScope(isolate, VMTag::kGCNewSpaceTagId);
276 RecordBeforeGC(kNew, kFull); 276 RecordBeforeGC(kNew, kFull);
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 heap->DisableGrowthControl(); 581 heap->DisableGrowthControl();
582 } 582 }
583 583
584 584
585 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 585 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
586 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 586 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
587 heap->SetGrowthControlState(current_growth_controller_state_); 587 heap->SetGrowthControlState(current_growth_controller_state_);
588 } 588 }
589 589
590 } // namespace dart 590 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698