| OLD | NEW |
| 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 MicrosecondsToMilliseconds(stats_.times_[1]), | 764 MicrosecondsToMilliseconds(stats_.times_[1]), |
| 765 MicrosecondsToMilliseconds(stats_.times_[2]), | 765 MicrosecondsToMilliseconds(stats_.times_[2]), |
| 766 MicrosecondsToMilliseconds(stats_.times_[3]), | 766 MicrosecondsToMilliseconds(stats_.times_[3]), |
| 767 stats_.data_[0], | 767 stats_.data_[0], |
| 768 stats_.data_[1], | 768 stats_.data_[1], |
| 769 stats_.data_[2], | 769 stats_.data_[2], |
| 770 stats_.data_[3]); | 770 stats_.data_[3]); |
| 771 } | 771 } |
| 772 | 772 |
| 773 | 773 |
| 774 #if defined(DEBUG) | |
| 775 NoSafepointScope::NoSafepointScope() : StackResource(Thread::Current()) { | |
| 776 thread()->IncrementNoSafepointScopeDepth(); | |
| 777 } | |
| 778 | |
| 779 | |
| 780 NoSafepointScope::~NoSafepointScope() { | |
| 781 thread()->DecrementNoSafepointScopeDepth(); | |
| 782 } | |
| 783 #endif // defined(DEBUG) | |
| 784 | |
| 785 | |
| 786 NoHeapGrowthControlScope::NoHeapGrowthControlScope() | 774 NoHeapGrowthControlScope::NoHeapGrowthControlScope() |
| 787 : StackResource(Isolate::Current()) { | 775 : StackResource(Isolate::Current()) { |
| 788 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); | 776 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); |
| 789 current_growth_controller_state_ = heap->GrowthControlState(); | 777 current_growth_controller_state_ = heap->GrowthControlState(); |
| 790 heap->DisableGrowthControl(); | 778 heap->DisableGrowthControl(); |
| 791 } | 779 } |
| 792 | 780 |
| 793 | 781 |
| 794 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { | 782 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { |
| 795 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); | 783 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); |
| 796 heap->SetGrowthControlState(current_growth_controller_state_); | 784 heap->SetGrowthControlState(current_growth_controller_state_); |
| 797 } | 785 } |
| 798 | 786 |
| 799 } // namespace dart | 787 } // namespace dart |
| OLD | NEW |