| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 OS::PrintErr("[ GC | space | count | start | gc time | " | 451 OS::PrintErr("[ GC | space | count | start | gc time | " |
| 452 "new gen (KB) | old gen (KB) | timers | data ]\n" | 452 "new gen (KB) | old gen (KB) | timers | data ]\n" |
| 453 "[ (isolate)| (reason)| | (s) | (ms) | " | 453 "[ (isolate)| (reason)| | (s) | (ms) | " |
| 454 " used , cap | used , cap | (ms) | ]\n"); | 454 " used , cap | used , cap | (ms) | ]\n"); |
| 455 } | 455 } |
| 456 | 456 |
| 457 const char* space_str = stats_.space_ == kNew ? "Scavenge" : "Mark-Sweep"; | 457 const char* space_str = stats_.space_ == kNew ? "Scavenge" : "Mark-Sweep"; |
| 458 OS::PrintErr( | 458 OS::PrintErr( |
| 459 "[ GC(%" Pd64 "): %s(%s), " // GC(isolate), space(reason) | 459 "[ GC(%" Pd64 "): %s(%s), " // GC(isolate), space(reason) |
| 460 "%" Pd ", " // count | 460 "%" Pd ", " // count |
| 461 "%.3f, " // start time | 461 "%" Pd64 ", " // start time |
| 462 "%.3f, " // total time | 462 "%" Pd64 ", " // total time |
| 463 "%" Pd ", %" Pd ", " // new gen: in use before/after | 463 "%" Pd ", %" Pd ", " // new gen: in use before/after |
| 464 "%" Pd ", %" Pd ", " // new gen: capacity before/after | 464 "%" Pd ", %" Pd ", " // new gen: capacity before/after |
| 465 "%" Pd ", %" Pd ", " // old gen: in use before/after | 465 "%" Pd ", %" Pd ", " // old gen: in use before/after |
| 466 "%" Pd ", %" Pd ", " // old gen: capacity before/after | 466 "%" Pd ", %" Pd ", " // old gen: capacity before/after |
| 467 "%.3f, %.3f, %.3f, %.3f, " // times | 467 "%" Pd64 ", %" Pd64 ", %" Pd64 ", %" Pd64 ", " // times |
| 468 "%" Pd ", %" Pd ", %" Pd ", %" Pd ", " // data | 468 "%" Pd ", %" Pd ", %" Pd ", %" Pd ", " // data |
| 469 "]\n", // End with a comma to make it easier to import in spreadsheets. | 469 "]\n", // End with a comma to make it easier to import in spreadsheets. |
| 470 isolate->main_port(), space_str, GCReasonToString(stats_.reason_), | 470 isolate->main_port(), space_str, GCReasonToString(stats_.reason_), |
| 471 stats_.num_, | 471 stats_.num_, |
| 472 RoundMicrosecondsToSeconds(stats_.before_.micros_ - isolate->start_time()), | 472 RoundMicrosecondsToSeconds(stats_.before_.micros_ - isolate->start_time()), |
| 473 RoundMicrosecondsToMilliseconds(stats_.after_.micros_ - | 473 RoundMicrosecondsToMilliseconds(stats_.after_.micros_ - |
| 474 stats_.before_.micros_), | 474 stats_.before_.micros_), |
| 475 RoundWordsToKB(stats_.before_.new_used_in_words_), | 475 RoundWordsToKB(stats_.before_.new_used_in_words_), |
| 476 RoundWordsToKB(stats_.after_.new_used_in_words_), | 476 RoundWordsToKB(stats_.after_.new_used_in_words_), |
| 477 RoundWordsToKB(stats_.before_.new_capacity_in_words_), | 477 RoundWordsToKB(stats_.before_.new_capacity_in_words_), |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 heap->DisableGrowthControl(); | 510 heap->DisableGrowthControl(); |
| 511 } | 511 } |
| 512 | 512 |
| 513 | 513 |
| 514 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { | 514 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { |
| 515 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); | 515 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); |
| 516 heap->SetGrowthControlState(current_growth_controller_state_); | 516 heap->SetGrowthControlState(current_growth_controller_state_); |
| 517 } | 517 } |
| 518 | 518 |
| 519 } // namespace dart | 519 } // namespace dart |
| OLD | NEW |