[svn:parrot] r49593 - branches/generational_gc/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Oct 20 05:31:51 UTC 2010


Author: bacek
Date: Wed Oct 20 05:31:50 2010
New Revision: 49593
URL: https://trac.parrot.org/parrot/changeset/49593

Log:
More statistic output

Modified:
   branches/generational_gc/src/gc/gc_ms2.c

Modified: branches/generational_gc/src/gc/gc_ms2.c
==============================================================================
--- branches/generational_gc/src/gc/gc_ms2.c	Wed Oct 20 02:47:50 2010	(r49592)
+++ branches/generational_gc/src/gc/gc_ms2.c	Wed Oct 20 05:31:50 2010	(r49593)
@@ -2036,15 +2036,37 @@
 static void
 gc_ms2_print_stats(PARROT_INTERP, const char* header, int gen)
 {
+#ifdef DETAIL_MEMORY_DEBUG
     MarkSweep_GC     *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
+    int count = 0;
+    Pool_Allocator_Arena *arena = self->pmc_allocator->top_arena;
 
-#ifdef DETAIL_MEMORY_DEBUG
-    fprintf(stderr, "%s\ngen: %d\n0: %d %d\n1: %d %d\n2: %d %d\n\n",
+    fprintf(stderr, "%s\ngen: %d\n0: %d %d\n1: %d %d\n2: %d %d\n",
             header,
             gen,
             self->objects[0]->count, self->strings[0]->count,
             self->objects[1]->count, self->strings[1]->count,
             self->objects[2]->count, self->strings[2]->count);
+
+
+
+    while (arena) {
+        count++;
+        arena = arena->next;
+    }
+    fprintf(stderr, "PMC: %d\n", count * GC_FIXED_SIZE_POOL_SIZE);
+
+    arena = self->string_allocator->top_arena;
+    while (arena) {
+        count++;
+        arena = arena->next;
+    }
+    fprintf(stderr, "STRING: %d\n", count * GC_FIXED_SIZE_POOL_SIZE);
+
+    fprintf(stderr, "buffers: %d\n", self->string_gc.memory_pool->total_allocated);
+
+    fprintf(stderr, "\n");
+
 #endif
 }
 


More information about the parrot-commits mailing list