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

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

Issue 1166433008: 2nd attempt at adding streamListen/streamCancel to the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix context objects Created 5 years, 6 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/debugger.cc ('k') | runtime/vm/isolate.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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 new_space_->AddGCTime(delta); 613 new_space_->AddGCTime(delta);
614 new_space_->IncrementCollections(); 614 new_space_->IncrementCollections();
615 } else { 615 } else {
616 old_space_->AddGCTime(delta); 616 old_space_->AddGCTime(delta);
617 old_space_->IncrementCollections(); 617 old_space_->IncrementCollections();
618 } 618 }
619 stats_.after_.new_ = new_space_->GetCurrentUsage(); 619 stats_.after_.new_ = new_space_->GetCurrentUsage();
620 stats_.after_.old_ = old_space_->GetCurrentUsage(); 620 stats_.after_.old_ = old_space_->GetCurrentUsage();
621 ASSERT(gc_in_progress_); 621 ASSERT(gc_in_progress_);
622 gc_in_progress_ = false; 622 gc_in_progress_ = false;
623 if (Service::NeedsEvents()) { 623 if (Service::NeedsGCEvents()) {
624 ServiceEvent event(Isolate::Current(), ServiceEvent::kGC); 624 ServiceEvent event(Isolate::Current(), ServiceEvent::kGC);
625 event.set_gc_stats(&stats_); 625 event.set_gc_stats(&stats_);
626 Service::HandleEvent(&event); 626 Service::HandleEvent(&event);
627 } 627 }
628 } 628 }
629 629
630 630
631 void Heap::PrintStats() { 631 void Heap::PrintStats() {
632 if (!FLAG_verbose_gc) return; 632 if (!FLAG_verbose_gc) return;
633 633
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 heap->DisableGrowthControl(); 701 heap->DisableGrowthControl();
702 } 702 }
703 703
704 704
705 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 705 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
706 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 706 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
707 heap->SetGrowthControlState(current_growth_controller_state_); 707 heap->SetGrowthControlState(current_growth_controller_state_);
708 } 708 }
709 709
710 } // namespace dart 710 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698