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

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

Issue 2734323003: Re-landing of "replace TrySync with Metadata". (Closed)
Patch Set: Address review comments Created 3 years, 9 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm.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 (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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 RecordBeforeGC(kOld, reason); 398 RecordBeforeGC(kOld, reason);
399 VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId); 399 VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
400 TIMELINE_FUNCTION_GC_DURATION(thread, "CollectOldGeneration"); 400 TIMELINE_FUNCTION_GC_DURATION(thread, "CollectOldGeneration");
401 NOT_IN_PRODUCT(UpdateClassHeapStatsBeforeGC(kOld)); 401 NOT_IN_PRODUCT(UpdateClassHeapStatsBeforeGC(kOld));
402 old_space_.MarkSweep(invoke_api_callbacks); 402 old_space_.MarkSweep(invoke_api_callbacks);
403 RecordAfterGC(kOld); 403 RecordAfterGC(kOld);
404 PrintStats(); 404 PrintStats();
405 NOT_IN_PRODUCT(PrintStatsToTimeline(&tds)); 405 NOT_IN_PRODUCT(PrintStatsToTimeline(&tds));
406 // Some Code objects may have been collected so invalidate handler cache. 406 // Some Code objects may have been collected so invalidate handler cache.
407 thread->isolate()->handler_info_cache()->Clear(); 407 thread->isolate()->handler_info_cache()->Clear();
408 thread->isolate()->catch_entry_state_cache()->Clear();
408 EndOldSpaceGC(); 409 EndOldSpaceGC();
409 } 410 }
410 } 411 }
411 412
412 413
413 void Heap::CollectGarbage(Space space, 414 void Heap::CollectGarbage(Space space,
414 ApiCallbacks api_callbacks, 415 ApiCallbacks api_callbacks,
415 GCReason reason) { 416 GCReason reason) {
416 Thread* thread = Thread::Current(); 417 Thread* thread = Thread::Current();
417 switch (space) { 418 switch (space) {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 Dart::vm_isolate()->heap()->WriteProtect(false); 848 Dart::vm_isolate()->heap()->WriteProtect(false);
848 } 849 }
849 850
850 851
851 WritableVMIsolateScope::~WritableVMIsolateScope() { 852 WritableVMIsolateScope::~WritableVMIsolateScope() {
852 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); 853 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
853 Dart::vm_isolate()->heap()->WriteProtect(true); 854 Dart::vm_isolate()->heap()->WriteProtect(true);
854 } 855 }
855 856
856 } // namespace dart 857 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698