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

Unified Diff: vm/heap.cc

Issue 10414048: Trace heap size during initialization after reading the snapshot. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap.cc
===================================================================
--- vm/heap.cc (revision 7863)
+++ vm/heap.cc (working copy)
@@ -57,10 +57,7 @@
}
CollectGarbage(kNew);
if (FLAG_verbose_gc) {
- OS::PrintErr("New space (%dk) Old space (%dk) Code space (%dk)\n",
- (new_space_->in_use() / KB),
- (old_space_->in_use() / KB),
- (code_space_->in_use() / KB));
+ PrintSizes();
}
addr = new_space_->TryAllocate(size);
if (addr != 0) {
@@ -76,10 +73,7 @@
if (addr == 0) {
CollectAllGarbage();
if (FLAG_verbose_gc) {
- OS::PrintErr("New space (%dk) Old space (%dk) Code space (%dk)\n",
- (new_space_->in_use() / KB),
- (old_space_->in_use() / KB),
- (code_space_->in_use() / KB));
+ PrintSizes();
}
addr = old_space_->TryAllocate(size);
if (addr == 0) {
@@ -208,6 +202,14 @@
}
+void Heap::PrintSizes() const {
+ OS::PrintErr("New space (%dk) Old space (%dk) Code space (%dk)\n",
+ (new_space_->in_use() / KB),
+ (old_space_->in_use() / KB),
+ (code_space_->in_use() / KB));
+}
+
+
#if defined(DEBUG)
NoGCScope::NoGCScope() : StackResource(Isolate::Current()) {
isolate()->IncrementNoGCScopeDepth();
« no previous file with comments | « vm/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698