Chromium Code Reviews| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 552 RoundWordsToKB(stats_.before_.old_.external_in_words), | 552 RoundWordsToKB(stats_.before_.old_.external_in_words), |
| 553 RoundWordsToKB(stats_.after_.old_.external_in_words), | 553 RoundWordsToKB(stats_.after_.old_.external_in_words), |
| 554 MicrosecondsToMilliseconds(stats_.times_[0]), | 554 MicrosecondsToMilliseconds(stats_.times_[0]), |
| 555 MicrosecondsToMilliseconds(stats_.times_[1]), | 555 MicrosecondsToMilliseconds(stats_.times_[1]), |
| 556 MicrosecondsToMilliseconds(stats_.times_[2]), | 556 MicrosecondsToMilliseconds(stats_.times_[2]), |
| 557 MicrosecondsToMilliseconds(stats_.times_[3]), | 557 MicrosecondsToMilliseconds(stats_.times_[3]), |
| 558 stats_.data_[0], | 558 stats_.data_[0], |
| 559 stats_.data_[1], | 559 stats_.data_[1], |
| 560 stats_.data_[2], | 560 stats_.data_[2], |
| 561 stats_.data_[3]); | 561 stats_.data_[3]); |
| 562 JSONStream js; | |
| 563 isolate->class_table()->AllocationProfilePrintToJSONStream(&js); | |
| 564 OS::PrintErr("%s\n", js.ToCString()); | |
|
Cutch
2014/04/23 19:36:00
remove debug code
| |
| 562 } | 565 } |
| 563 | 566 |
| 564 | 567 |
| 565 #if defined(DEBUG) | 568 #if defined(DEBUG) |
| 566 NoGCScope::NoGCScope() : StackResource(Isolate::Current()) { | 569 NoGCScope::NoGCScope() : StackResource(Isolate::Current()) { |
| 567 isolate()->IncrementNoGCScopeDepth(); | 570 isolate()->IncrementNoGCScopeDepth(); |
| 568 } | 571 } |
| 569 | 572 |
| 570 | 573 |
| 571 NoGCScope::~NoGCScope() { | 574 NoGCScope::~NoGCScope() { |
| 572 isolate()->DecrementNoGCScopeDepth(); | 575 isolate()->DecrementNoGCScopeDepth(); |
| 573 } | 576 } |
| 574 #endif // defined(DEBUG) | 577 #endif // defined(DEBUG) |
| 575 | 578 |
| 576 | 579 |
| 577 NoHeapGrowthControlScope::NoHeapGrowthControlScope() | 580 NoHeapGrowthControlScope::NoHeapGrowthControlScope() |
| 578 : StackResource(Isolate::Current()) { | 581 : StackResource(Isolate::Current()) { |
| 579 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); | 582 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); |
| 580 current_growth_controller_state_ = heap->GrowthControlState(); | 583 current_growth_controller_state_ = heap->GrowthControlState(); |
| 581 heap->DisableGrowthControl(); | 584 heap->DisableGrowthControl(); |
| 582 } | 585 } |
| 583 | 586 |
| 584 | 587 |
| 585 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { | 588 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { |
| 586 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); | 589 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); |
| 587 heap->SetGrowthControlState(current_growth_controller_state_); | 590 heap->SetGrowthControlState(current_growth_controller_state_); |
| 588 } | 591 } |
| 589 | 592 |
| 590 } // namespace dart | 593 } // namespace dart |
| OLD | NEW |