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

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

Issue 1077823003: Some cleanups in the code that posts results to service clients. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « runtime/vm/debugger.cc ('k') | runtime/vm/service.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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 new_space_->AddGCTime(delta); 632 new_space_->AddGCTime(delta);
633 new_space_->IncrementCollections(); 633 new_space_->IncrementCollections();
634 } else { 634 } else {
635 old_space_->AddGCTime(delta); 635 old_space_->AddGCTime(delta);
636 old_space_->IncrementCollections(); 636 old_space_->IncrementCollections();
637 } 637 }
638 stats_.after_.new_ = new_space_->GetCurrentUsage(); 638 stats_.after_.new_ = new_space_->GetCurrentUsage();
639 stats_.after_.old_ = old_space_->GetCurrentUsage(); 639 stats_.after_.old_ = old_space_->GetCurrentUsage();
640 ASSERT(gc_in_progress_); 640 ASSERT(gc_in_progress_);
641 gc_in_progress_ = false; 641 gc_in_progress_ = false;
642 if (Service::NeedsGCEvents()) { 642 if (Service::NeedsEvents()) {
643 GCEvent event(stats_); 643 GCEvent event(stats_);
644 Service::HandleGCEvent(&event); 644 Service::HandleGCEvent(&event);
645 } 645 }
646 } 646 }
647 647
648 648
649 void Heap::PrintStats() { 649 void Heap::PrintStats() {
650 if (!FLAG_verbose_gc) return; 650 if (!FLAG_verbose_gc) return;
651 651
652 if ((FLAG_verbose_gc_hdr != 0) && 652 if ((FLAG_verbose_gc_hdr != 0) &&
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 heap->DisableGrowthControl(); 734 heap->DisableGrowthControl();
735 } 735 }
736 736
737 737
738 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 738 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
739 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 739 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
740 heap->SetGrowthControlState(current_growth_controller_state_); 740 heap->SetGrowthControlState(current_growth_controller_state_);
741 } 741 }
742 742
743 } // namespace dart 743 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698