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

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

Issue 191743002: Replace RoundMicrosecondsTo* utility. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/pages.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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 "%.3f, " // total time 483 "%.3f, " // total time
484 "%" Pd ", %" Pd ", " // new gen: in use before/after 484 "%" Pd ", %" Pd ", " // new gen: in use before/after
485 "%" Pd ", %" Pd ", " // new gen: capacity before/after 485 "%" Pd ", %" Pd ", " // new gen: capacity before/after
486 "%" Pd ", %" Pd ", " // old gen: in use before/after 486 "%" Pd ", %" Pd ", " // old gen: in use before/after
487 "%" Pd ", %" Pd ", " // old gen: capacity before/after 487 "%" Pd ", %" Pd ", " // old gen: capacity before/after
488 "%.3f, %.3f, %.3f, %.3f, " // times 488 "%.3f, %.3f, %.3f, %.3f, " // times
489 "%" Pd ", %" Pd ", %" Pd ", %" Pd ", " // data 489 "%" Pd ", %" Pd ", %" Pd ", %" Pd ", " // data
490 "]\n", // End with a comma to make it easier to import in spreadsheets. 490 "]\n", // End with a comma to make it easier to import in spreadsheets.
491 isolate->main_port(), space_str, GCReasonToString(stats_.reason_), 491 isolate->main_port(), space_str, GCReasonToString(stats_.reason_),
492 stats_.num_, 492 stats_.num_,
493 RoundMicrosecondsToSeconds(stats_.before_.micros_ - isolate->start_time()), 493 MicrosecondsToSeconds(stats_.before_.micros_ - isolate->start_time()),
494 RoundMicrosecondsToMilliseconds(stats_.after_.micros_ - 494 MicrosecondsToMilliseconds(stats_.after_.micros_ -
495 stats_.before_.micros_), 495 stats_.before_.micros_),
496 RoundWordsToKB(stats_.before_.new_used_in_words_), 496 RoundWordsToKB(stats_.before_.new_used_in_words_),
497 RoundWordsToKB(stats_.after_.new_used_in_words_), 497 RoundWordsToKB(stats_.after_.new_used_in_words_),
498 RoundWordsToKB(stats_.before_.new_capacity_in_words_), 498 RoundWordsToKB(stats_.before_.new_capacity_in_words_),
499 RoundWordsToKB(stats_.after_.new_capacity_in_words_), 499 RoundWordsToKB(stats_.after_.new_capacity_in_words_),
500 RoundWordsToKB(stats_.before_.old_used_in_words_), 500 RoundWordsToKB(stats_.before_.old_used_in_words_),
501 RoundWordsToKB(stats_.after_.old_used_in_words_), 501 RoundWordsToKB(stats_.after_.old_used_in_words_),
502 RoundWordsToKB(stats_.before_.old_capacity_in_words_), 502 RoundWordsToKB(stats_.before_.old_capacity_in_words_),
503 RoundWordsToKB(stats_.after_.old_capacity_in_words_), 503 RoundWordsToKB(stats_.after_.old_capacity_in_words_),
504 RoundMicrosecondsToMilliseconds(stats_.times_[0]), 504 MicrosecondsToMilliseconds(stats_.times_[0]),
505 RoundMicrosecondsToMilliseconds(stats_.times_[1]), 505 MicrosecondsToMilliseconds(stats_.times_[1]),
506 RoundMicrosecondsToMilliseconds(stats_.times_[2]), 506 MicrosecondsToMilliseconds(stats_.times_[2]),
507 RoundMicrosecondsToMilliseconds(stats_.times_[3]), 507 MicrosecondsToMilliseconds(stats_.times_[3]),
508 stats_.data_[0], 508 stats_.data_[0],
509 stats_.data_[1], 509 stats_.data_[1],
510 stats_.data_[2], 510 stats_.data_[2],
511 stats_.data_[3]); 511 stats_.data_[3]);
512 } 512 }
513 513
514 514
515 #if defined(DEBUG) 515 #if defined(DEBUG)
516 NoGCScope::NoGCScope() : StackResource(Isolate::Current()) { 516 NoGCScope::NoGCScope() : StackResource(Isolate::Current()) {
517 isolate()->IncrementNoGCScopeDepth(); 517 isolate()->IncrementNoGCScopeDepth();
(...skipping 13 matching lines...) Expand all
531 heap->DisableGrowthControl(); 531 heap->DisableGrowthControl();
532 } 532 }
533 533
534 534
535 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 535 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
536 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 536 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
537 heap->SetGrowthControlState(current_growth_controller_state_); 537 heap->SetGrowthControlState(current_growth_controller_state_);
538 } 538 }
539 539
540 } // namespace dart 540 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698