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/pages.h" | 5 #include "vm/pages.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/gc_marker.h" | 8 #include "vm/gc_marker.h" |
9 #include "vm/gc_sweeper.h" | 9 #include "vm/gc_sweeper.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 431 |
432 int64_t end = OS::GetCurrentTimeMillis(); | 432 int64_t end = OS::GetCurrentTimeMillis(); |
433 timer.Stop(); | 433 timer.Stop(); |
434 | 434 |
435 // Record signals for growth control. | 435 // Record signals for growth control. |
436 page_space_controller_.EvaluateGarbageCollection(in_use_before, in_use, | 436 page_space_controller_.EvaluateGarbageCollection(in_use_before, in_use, |
437 start, end); | 437 start, end); |
438 | 438 |
439 if (FLAG_verbose_gc) { | 439 if (FLAG_verbose_gc) { |
440 const intptr_t KB2 = KB / 2; | 440 const intptr_t KB2 = KB / 2; |
441 OS::PrintErr("Mark-Sweep[%d]: %lldus (%dK -> %dK, %dK)\n", | 441 OS::PrintErr("Mark-Sweep[%d]: %"Pd64"us (%"Pd"K -> %"Pd"K, %"Pd"K)\n", |
442 count_, | 442 count_, |
443 timer.TotalElapsedTime(), | 443 timer.TotalElapsedTime(), |
444 (in_use_before + (KB2)) / KB, | 444 (in_use_before + (KB2)) / KB, |
445 (in_use + (KB2)) / KB, | 445 (in_use + (KB2)) / KB, |
446 (capacity_ + KB2) / KB); | 446 (capacity_ + KB2) / KB); |
447 } | 447 } |
448 | 448 |
449 if (FLAG_print_free_list_after_gc) { | 449 if (FLAG_print_free_list_after_gc) { |
450 freelist_.Print(); | 450 freelist_.Print(); |
451 } | 451 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 return 0; | 581 return 0; |
582 } else { | 582 } else { |
583 ASSERT(total_time >= gc_time); | 583 ASSERT(total_time >= gc_time); |
584 int result= static_cast<int>((static_cast<double>(gc_time) / | 584 int result= static_cast<int>((static_cast<double>(gc_time) / |
585 static_cast<double>(total_time)) * 100); | 585 static_cast<double>(total_time)) * 100); |
586 return result; | 586 return result; |
587 } | 587 } |
588 } | 588 } |
589 | 589 |
590 } // namespace dart | 590 } // namespace dart |
OLD | NEW |