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

Side by Side Diff: src/heap.cc

Issue 9307116: Add timestamp to --trace-gc output. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 | « no previous file | src/isolate.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6577 matching lines...) Expand 10 before | Expand all | Expand 10 after
6588 if (FLAG_print_cumulative_gc_stat) { 6588 if (FLAG_print_cumulative_gc_stat) {
6589 heap_->max_gc_pause_ = Max(heap_->max_gc_pause_, time); 6589 heap_->max_gc_pause_ = Max(heap_->max_gc_pause_, time);
6590 heap_->max_alive_after_gc_ = Max(heap_->max_alive_after_gc_, 6590 heap_->max_alive_after_gc_ = Max(heap_->max_alive_after_gc_,
6591 heap_->alive_after_last_gc_); 6591 heap_->alive_after_last_gc_);
6592 if (!first_gc) { 6592 if (!first_gc) {
6593 heap_->min_in_mutator_ = Min(heap_->min_in_mutator_, 6593 heap_->min_in_mutator_ = Min(heap_->min_in_mutator_,
6594 static_cast<int>(spent_in_mutator_)); 6594 static_cast<int>(spent_in_mutator_));
6595 } 6595 }
6596 } 6596 }
6597 6597
6598 PrintF("%8.0f ms: ", heap_->isolate()->time_millis_since_init());
6599
6598 if (!FLAG_trace_gc_nvp) { 6600 if (!FLAG_trace_gc_nvp) {
6599 int external_time = static_cast<int>(scopes_[Scope::EXTERNAL]); 6601 int external_time = static_cast<int>(scopes_[Scope::EXTERNAL]);
6600 6602
6601 double end_memory_size_mb = 6603 double end_memory_size_mb =
6602 static_cast<double>(heap_->isolate()->memory_allocator()->Size()) / MB; 6604 static_cast<double>(heap_->isolate()->memory_allocator()->Size()) / MB;
6603 6605
6604 PrintF("%s %.1f (%.1f) -> %.1f (%.1f) MB, ", 6606 PrintF("%s %.1f (%.1f) -> %.1f (%.1f) MB, ",
6605 CollectorString(), 6607 CollectorString(),
6606 static_cast<double>(start_object_size_) / MB, 6608 static_cast<double>(start_object_size_) / MB,
6607 static_cast<double>(start_memory_size_) / MB, 6609 static_cast<double>(start_memory_size_) / MB,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
6878 isolate_->heap()->store_buffer()->Compact(); 6880 isolate_->heap()->store_buffer()->Compact();
6879 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6881 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6880 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6882 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6881 next = chunk->next_chunk(); 6883 next = chunk->next_chunk();
6882 isolate_->memory_allocator()->Free(chunk); 6884 isolate_->memory_allocator()->Free(chunk);
6883 } 6885 }
6884 chunks_queued_for_free_ = NULL; 6886 chunks_queued_for_free_ = NULL;
6885 } 6887 }
6886 6888
6887 } } // namespace v8::internal 6889 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698