From 23898ea2afbd8cce7e6168fa0bb6ed88a9210568 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Mon, 22 Oct 1990 12:28:28 +0000 Subject: [PATCH] put #ifdef PRINTNOISE/#endif around printfs. --- ldb/coreparse.c | 4 +++- ldb/gc.c | 14 ++++++-------- ldb/save.c | 5 ++++- ldb/validate.c | 6 +++++- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ldb/coreparse.c b/ldb/coreparse.c index e6bc7de31..9bb0ccb71 100644 --- a/ldb/coreparse.c +++ b/ldb/coreparse.c @@ -1,4 +1,4 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/coreparse.c,v 1.5 1990/07/01 04:39:57 wlott Exp $ */ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/coreparse.c,v 1.6 1990/10/22 12:26:54 wlott Exp $ */ #include <stdio.h> #include <mach.h> #include <sys/types.h> @@ -29,7 +29,9 @@ long *ptr; len = CORE_PAGESIZE * entry->page_count; if (len != 0) { +#ifdef PRINTNOISE printf("Mapping %d bytes at 0x%x.\n", len, addr); +#endif os_map(fd, offset, addr, len); } diff --git a/ldb/gc.c b/ldb/gc.c index 70c74e0f0..2a696185c 100644 --- a/ldb/gc.c +++ b/ldb/gc.c @@ -1,7 +1,7 @@ /* * Stop and Copy GC based on Cheney's algorithm. * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/gc.c,v 1.15 1990/10/13 04:49:50 wlott Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/gc.c,v 1.16 1990/10/22 12:28:20 wlott Exp $ * * Written by Christopher Hoover. */ @@ -132,22 +132,24 @@ struct timeval *x, *y; collect_garbage() { +#ifdef PRINTNOISE struct timeval start_tv, stop_tv; struct rusage start_rusage, stop_rusage; double real_time, system_time, user_time; double percent_retained, gc_rate; + unsigned long size_retained, size_discarded; +#endif lispobj *current_static_space_free_pointer; unsigned long static_space_size; unsigned long control_stack_size, binding_stack_size; - unsigned long size_retained, size_discarded; int oldmask; #ifdef PRINTNOISE printf("[Collecting garbage ... \n"); -#endif getrusage(RUSAGE_SELF, &start_rusage); gettimeofday(&start_tv, (struct timezone *) 0); +#endif oldmask = sigblock(BLOCKABLE); @@ -269,21 +271,18 @@ collect_garbage() #ifdef PRINTNOISE printf("done.]\n"); -#endif percent_retained = (((float) size_retained) / ((float) size_discarded)) * 100.0; -#ifdef PRINTNOISE printf("Total of %d bytes out of %d bytes retained (%3.2f%%).\n", size_retained, size_discarded, percent_retained); -#endif real_time = tv_diff(&stop_tv, &start_tv); user_time = tv_diff(&stop_rusage.ru_utime, &start_rusage.ru_utime); system_time = tv_diff(&stop_rusage.ru_stime, &start_rusage.ru_stime); -#ifdef PRINTNOISE +#ifdef 0 printf("Statistics:\n"); printf("%10.2f sec of real time\n", real_time); printf("%10.2f sec of user time,\n", user_time); @@ -293,7 +292,6 @@ collect_garbage() real_time, user_time, system_time); #endif -#ifdef PRINTNOISE gc_rate = ((float) size_retained / (float) (1<<20)) / real_time; printf("%10.2f M bytes/sec collected.\n", gc_rate); diff --git a/ldb/save.c b/ldb/save.c index e1d4a1fd1..baff79636 100644 --- a/ldb/save.c +++ b/ldb/save.c @@ -221,7 +221,9 @@ char *name; } } +#ifdef PRINTNOISE printf("Mapping %d bytes onto the %s stack at 0x%08x.\n", len, name, start); +#endif os_map(fd, (1+data_page)*CORE_PAGESIZE, start, len); } @@ -280,8 +282,9 @@ struct sigcontext *old_context; /* We have to move the number stack into place. */ nsp = trunc_page((vm_address_t)context.sc_regs[NSP]); len = (vm_address_t)number_stack_start - nsp; +#ifdef PRINTNOISE printf("Moving the number stack from 0x%08x to 0x%08x.\n", number_stack, nsp); - +#endif bcopy(number_stack, nsp, len); vm_deallocate(task_self(), number_stack, round_page(len)); diff --git a/ldb/validate.c b/ldb/validate.c index d9ce6b597..84ffe12b8 100644 --- a/ldb/validate.c +++ b/ldb/validate.c @@ -1,5 +1,5 @@ /* - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/validate.c,v 1.3 1990/06/04 01:32:12 ch Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/validate.c,v 1.4 1990/10/22 12:28:28 wlott Exp $ * * Memory Validation */ @@ -12,8 +12,10 @@ validate() { +#ifdef PRINTNOISE printf("Validating memory ..."); fflush(stdout); +#endif /* Read-Only Space */ read_only_space = (lispobj *) READ_ONLY_SPACE_START; @@ -46,5 +48,7 @@ validate() os_validate((os_vm_address_t) binding_stack, (os_vm_size_t) BINDING_STACK_SIZE); +#ifdef PRINTNOISE printf(" done.\n"); +#endif } -- GitLab