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

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

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/gc_marker.cc ('k') | runtime/vm/isolate.h » ('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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 new_space_.AddGCTime(delta); 753 new_space_.AddGCTime(delta);
754 new_space_.IncrementCollections(); 754 new_space_.IncrementCollections();
755 } else { 755 } else {
756 old_space_.AddGCTime(delta); 756 old_space_.AddGCTime(delta);
757 old_space_.IncrementCollections(); 757 old_space_.IncrementCollections();
758 } 758 }
759 stats_.after_.new_ = new_space_.GetCurrentUsage(); 759 stats_.after_.new_ = new_space_.GetCurrentUsage();
760 stats_.after_.old_ = old_space_.GetCurrentUsage(); 760 stats_.after_.old_ = old_space_.GetCurrentUsage();
761 ASSERT((space == kNew && gc_new_space_in_progress_) || 761 ASSERT((space == kNew && gc_new_space_in_progress_) ||
762 (space == kOld && gc_old_space_in_progress_)); 762 (space == kOld && gc_old_space_in_progress_));
763 if (Service::gc_stream.enabled()) { 763 if (FLAG_support_service && Service::gc_stream.enabled()) {
764 ServiceEvent event(Isolate::Current(), ServiceEvent::kGC); 764 ServiceEvent event(Isolate::Current(), ServiceEvent::kGC);
765 event.set_gc_stats(&stats_); 765 event.set_gc_stats(&stats_);
766 Service::HandleEvent(&event); 766 Service::HandleEvent(&event);
767 } 767 }
768 } 768 }
769 769
770 770
771 void Heap::PrintStats() { 771 void Heap::PrintStats() {
772 if (!FLAG_verbose_gc) return; 772 if (!FLAG_verbose_gc) return;
773 773
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 Dart::vm_isolate()->heap()->WriteProtect(false, include_code_pages_); 842 Dart::vm_isolate()->heap()->WriteProtect(false, include_code_pages_);
843 } 843 }
844 844
845 845
846 WritableVMIsolateScope::~WritableVMIsolateScope() { 846 WritableVMIsolateScope::~WritableVMIsolateScope() {
847 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); 847 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
848 Dart::vm_isolate()->heap()->WriteProtect(true, include_code_pages_); 848 Dart::vm_isolate()->heap()->WriteProtect(true, include_code_pages_);
849 } 849 }
850 850
851 } // namespace dart 851 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698