Index: /trunk/source/lisp-kernel/gc-common.c
===================================================================
--- /trunk/source/lisp-kernel/gc-common.c	(revision 8244)
+++ /trunk/source/lisp-kernel/gc-common.c	(revision 8245)
@@ -26,4 +26,51 @@
 #include <sys/time.h>
 
+#ifndef timeradd
+# define timeradd(a, b, result)						      \
+  do {									      \
+    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;			      \
+    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;			      \
+    if ((result)->tv_usec >= 1000000)					      \
+      {									      \
+	++(result)->tv_sec;						      \
+	(result)->tv_usec -= 1000000;					      \
+      }									      \
+  } while (0)
+#endif
+#ifndef timersub
+# define timersub(a, b, result)						      \
+  do {									      \
+    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;			      \
+    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;			      \
+    if ((result)->tv_usec < 0) {					      \
+      --(result)->tv_sec;						      \
+      (result)->tv_usec += 1000000;					      \
+    }									      \
+  } while (0)
+#endif
+
+void
+comma_output_decimal(char *buf, int len, natural n) 
+{
+  int nout = 0;
+
+  buf[--len] = 0;
+  do {
+    buf[--len] = n%10+'0';
+    n = n/10;
+    if (n == 0) {
+      while (len) {
+        buf[--len] = ' ';
+      }
+      return;
+    }
+    if (len == 0) return;
+    nout ++;
+    if (nout == 3) {
+      buf[--len] = ',';
+      nout = 0;
+    }
+  } while (len >= 0);
+}
 
 
@@ -794,4 +841,5 @@
   area *a = active_dynamic_area, *to = NULL, *from = NULL, *note = NULL;
   unsigned timeidx = 1;
+  paging_info paging_info_start;
   xframe_list *x;
   LispObj
@@ -846,4 +894,8 @@
 
   if (GCverbose) {
+    char buf[16];
+
+    sample_paging_info(&paging_info_start);
+    comma_output_decimal(buf,16,area_dnode(oldfree,a->low) << dnode_shift);
     if (GCephemeral_low) {
       fprintf(stderr,
@@ -853,5 +905,5 @@
       fprintf(stderr,"\n\n;;; Starting full GC");
     }
-    fprintf(stderr, ",  %ld bytes allocated.\n", area_dnode(oldfree,a->low) << dnode_shift);
+    fprintf(stderr, ", %s bytes allocated.\n", buf);
   }
 
@@ -1148,17 +1200,23 @@
       *( (long long *) ptr_from_lispobj(((macptr *) ptr_from_lispobj(untag(val)))->address)) += justfreed;
       if (GCverbose) {
+        char buf[16];
+        paging_info paging_info_stop;
+
+        sample_paging_info(&paging_info_stop);
         if (justfreed <= heap_segment_size) {
           justfreed = 0;
         }
+        comma_output_decimal(buf,16,justfreed);
         if (note == tenured_area) {
-          fprintf(stderr,";;; Finished full GC.  Freed %lld bytes in %d.%06d s\n\n", justfreed, elapsed.tv_sec, elapsed.tv_usec);
+          fprintf(stderr,";;; Finished full GC. %s bytes freed in %d.%06d s\n\n", buf, elapsed.tv_sec, elapsed.tv_usec);
         } else {
-          fprintf(stderr,";;; Finished Ephemeral GC of generation %d.  Freed %lld bytes in %d.%06d s\n\n", 
+          fprintf(stderr,";;; Finished EGC of generation %d. %s bytes freed in %d.%06d s\n\n", 
                   (from == g2_area) ? 2 : (from == g1_area) ? 1 : 0,
-                  justfreed, 
+                  buf, 
                   elapsed.tv_sec, elapsed.tv_usec);
         }
-      }
-    }
-  }
-}
+        report_paging_info_delta(stderr, &paging_info_start, &paging_info_stop);
+      }
+    }
+  }
+}
Index: /trunk/source/lisp-kernel/gc.h
===================================================================
--- /trunk/source/lisp-kernel/gc.h	(revision 8244)
+++ /trunk/source/lisp-kernel/gc.h	(revision 8245)
@@ -111,4 +111,19 @@
 #define VOID_ALLOCPTR ((LispObj)(-dnode_size))
 #endif
+
+#ifdef DARWIN
+#include <mach/task_info.h>
+typedef struct task_events_info paging_info;
+#else
+#ifndef WINDOWS
+#include <sys/resource.h>
+typedef struct rusage paging_info;
+#endif
+#endif
+
+#include <stdio.h>
+
+void sample_paging_info(paging_info *);
+void report_paging_info_delta(FILE*, paging_info *, paging_info *);
 
 
Index: /trunk/source/lisp-kernel/pmcl-kernel.c
===================================================================
--- /trunk/source/lisp-kernel/pmcl-kernel.c	(revision 8244)
+++ /trunk/source/lisp-kernel/pmcl-kernel.c	(revision 8245)
@@ -1880,2 +1880,42 @@
 
 
+#ifdef DARWIN
+void
+sample_paging_info(paging_info *stats)
+{
+  mach_msg_type_number_t count = TASK_EVENTS_INFO_COUNT;
+
+  task_info(mach_task_self(),
+            TASK_EVENTS_INFO,
+            (task_info_t)stats,
+            &count);
+}
+
+void
+report_paging_info_delta(FILE *out, paging_info *start, paging_info *stop)
+{
+  fprintf(out,";;; %d soft faults, %d faults, %d pageins\n\n",
+          stop->cow_faults-start->cow_faults,
+          stop->faults-start->faults,
+          stop->pageins-start->pageins);
+}
+
+#else
+#ifndef WINDOWS
+void
+sample_paging_info(struct rusage *usage)
+{
+  getrusage(RUSAGE_SELF, rusage);
+}
+
+void
+report_paging_info_delta(FILE *out, paging_info *start, paging_info *stop)
+{
+  fprintf(out,";;; %d soft faults, %d faults, %d pageins\n\n",
+          stop->ru_minflt-start->ru_minflt,
+          stop->ru_majflt-start->ru_majflt,
+          stop->ru_nswap-start->ru_nswap);
+}
+
+#endif
+#endif
