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

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

Issue 2739663002: Revert "Replacing TrySync with Metadata" (Closed)
Patch Set: 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();
409 EndOldSpaceGC(); 408 EndOldSpaceGC();
410 } 409 }
411 } 410 }
412 411
413 412
414 void Heap::CollectGarbage(Space space, 413 void Heap::CollectGarbage(Space space,
415 ApiCallbacks api_callbacks, 414 ApiCallbacks api_callbacks,
416 GCReason reason) { 415 GCReason reason) {
417 Thread* thread = Thread::Current(); 416 Thread* thread = Thread::Current();
418 switch (space) { 417 switch (space) {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 Dart::vm_isolate()->heap()->WriteProtect(false); 847 Dart::vm_isolate()->heap()->WriteProtect(false);
849 } 848 }
850 849
851 850
852 WritableVMIsolateScope::~WritableVMIsolateScope() { 851 WritableVMIsolateScope::~WritableVMIsolateScope() {
853 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); 852 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
854 Dart::vm_isolate()->heap()->WriteProtect(true); 853 Dart::vm_isolate()->heap()->WriteProtect(true);
855 } 854 }
856 855
857 } // namespace dart 856 } // 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