diff options
author | dg <dg@FreeBSD.org> | 1995-04-16 12:56:22 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-04-16 12:56:22 +0000 |
commit | a61613661668fe8cbc1d2e2954ac3d5420a98bb3 (patch) | |
tree | 30ece1eb91c56b36f4f7ba9fdcef17001d37f92a /sys/vm | |
parent | 5740903169d0d117d863eb8177588dd30c267e33 (diff) | |
download | FreeBSD-src-a61613661668fe8cbc1d2e2954ac3d5420a98bb3.zip FreeBSD-src-a61613661668fe8cbc1d2e2954ac3d5420a98bb3.tar.gz |
Moved some zero-initialized variables into .bss. Made code intended to be
called only from DDB #ifdef DDB. Removed some completely unused globals.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/device_pager.c | 4 | ||||
-rw-r--r-- | sys/vm/kern_lock.c | 4 | ||||
-rw-r--r-- | sys/vm/swap_pager.c | 4 | ||||
-rw-r--r-- | sys/vm/vm_glue.c | 18 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 8 | ||||
-rw-r--r-- | sys/vm/vm_mmap.c | 4 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 13 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 4 | ||||
-rw-r--r-- | sys/vm/vm_pageout.c | 6 |
9 files changed, 29 insertions, 36 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 36b2ec4..80ef252 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)device_pager.c 8.1 (Berkeley) 6/11/93 - * $Id: device_pager.c,v 1.6 1995/02/21 01:22:43 davidg Exp $ + * $Id: device_pager.c,v 1.7 1995/03/11 22:25:00 davidg Exp $ */ /* @@ -59,7 +59,7 @@ struct pagerlst dev_pager_list; /* list of managed devices */ struct pglist dev_pager_fakelist; /* list of available vm_page_t's */ #ifdef DEBUG -int dpagerdebug = 0; +int dpagerdebug; #define DDB_FOLLOW 0x01 #define DDB_INIT 0x02 diff --git a/sys/vm/kern_lock.c b/sys/vm/kern_lock.c index 55892d6..dbc13ae 100644 --- a/sys/vm/kern_lock.c +++ b/sys/vm/kern_lock.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: kern_lock.c,v 1.3 1995/01/09 16:05:30 davidg Exp $ + * $Id: kern_lock.c,v 1.4 1995/03/01 21:37:37 davidg Exp $ */ /* @@ -154,7 +154,7 @@ int lock_wait_time = 100; * It is silly to spin on a uni-processor as if we thought something magical * would happen to the want_write bit while we are executing. */ -int lock_wait_time = 0; +int lock_wait_time; #endif /* NCPUS > 1 */ diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 928a91e..b5f9506 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$ * * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94 - * $Id: swap_pager.c,v 1.31 1995/03/19 14:29:24 davidg Exp $ + * $Id: swap_pager.c,v 1.32 1995/03/22 05:12:18 davidg Exp $ */ /* @@ -886,8 +886,6 @@ swap_pager_ridpages(m, count, reqpage) swap_pager_freepage(m[i]); } -int swapwritecount = 0; - /* * swap_pager_iodone1 is the completion routine for both reads and async writes */ diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index c8c97fe..973b867 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -59,7 +59,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_glue.c,v 1.17 1995/02/21 12:06:06 davidg Exp $ + * $Id: vm_glue.c,v 1.18 1995/03/28 07:58:53 bde Exp $ */ #include <sys/param.h> @@ -82,8 +82,6 @@ #include <machine/cpu.h> extern char kstack[]; -int avefree = 0; /* XXX */ -int readbuffers = 0; /* XXX allow kgdb to read kernel buffer pool */ /* vm_map_t upages_map; */ @@ -290,15 +288,6 @@ vm_init_limits(p) p->p_rlimit[RLIMIT_RSS].rlim_max = RLIM_INFINITY; } -#ifdef DEBUG -int enableswap = 1; -int swapdebug = 0; - -#define SDB_FOLLOW 1 -#define SDB_SWAPIN 2 -#define SDB_SWAPOUT 4 -#endif - void faultin(p) struct proc *p; @@ -564,11 +553,13 @@ thread_wakeup(event) } #endif +#ifdef DDB + /* * DEBUG stuff */ -int indent = 0; +int indent; #include <machine/stdarg.h> /* see subr_prf.c */ @@ -594,3 +585,4 @@ iprintf(fmt /* , va_alist */ ) printf("%r", fmt, ap); va_end(ap); } +#endif /* DDB */ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index a620084..d7c1b1f 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.19 1995/03/22 12:24:08 davidg Exp $ + * $Id: vm_map.c,v 1.20 1995/03/25 17:36:57 davidg Exp $ */ /* @@ -142,8 +142,8 @@ vm_map_entry_t kentry_free; vm_map_t kmap_free; int kentry_count; -static vm_offset_t mapvm_start = 0, mapvm = 0, mapvmmax; -static int mapvmpgcnt = 0; +static vm_offset_t mapvm_start, mapvm, mapvmmax; +static int mapvmpgcnt; static void _vm_map_clip_end __P((vm_map_t, vm_map_entry_t, vm_offset_t)); static void _vm_map_clip_start __P((vm_map_t, vm_map_entry_t, vm_offset_t)); @@ -2599,6 +2599,7 @@ vm_map_simplify(map, start) vm_map_unlock(map); } +#ifdef DDB /* * vm_map_print: [ debug ] */ @@ -2666,3 +2667,4 @@ vm_map_print(map, full) } indent -= 2; } +#endif diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 9e1174c..a4a9a62 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -38,7 +38,7 @@ * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ * * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 - * $Id: vm_mmap.c,v 1.20 1995/03/25 17:36:00 davidg Exp $ + * $Id: vm_mmap.c,v 1.21 1995/03/25 17:44:03 davidg Exp $ */ /* @@ -63,7 +63,7 @@ #include <vm/vm_prot.h> #ifdef DEBUG -int mmapdebug = 0; +int mmapdebug; #define MDB_FOLLOW 0x01 #define MDB_SYNC 0x02 diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 66acf44..f145515 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.41 1995/04/09 06:03:49 davidg Exp $ + * $Id: vm_object.c,v 1.42 1995/04/16 03:11:28 davidg Exp $ */ /* @@ -123,8 +123,8 @@ int vm_object_cache_max; struct vm_object_hash_head vm_object_hashtable[VM_OBJECT_HASH_COUNT]; -long object_collapses = 0; -long object_bypasses = 0; +long object_collapses; +long object_bypasses; static void _vm_object_allocate(size, object) @@ -1667,6 +1667,8 @@ vm_object_page_lookup(object, offset) return m; } +#ifdef DDB + int _vm_object_in_map(map, object, entry) vm_map_t map; @@ -1744,6 +1746,7 @@ vm_object_in_map( object) return 0; } + void vm_object_check() { int i; @@ -1789,8 +1792,6 @@ vm_object_check() { } } -#define DEBUG -#if defined(DEBUG) || defined(DDB) /* * vm_object_print: [ debug ] */ @@ -1838,4 +1839,4 @@ vm_object_print(object, full) printf("\n"); indent -= 2; } -#endif /* defined(DEBUG) || defined(DDB) */ +#endif /* DDB */ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 952b11b..96537d0 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.29 1995/04/16 09:59:16 davidg Exp $ + * $Id: vm_page.c,v 1.30 1995/04/16 11:50:45 davidg Exp $ */ /* @@ -84,7 +84,7 @@ */ struct pglist *vm_page_buckets; /* Array of buckets */ -int vm_page_bucket_count = 0; /* How big is array? */ +int vm_page_bucket_count; /* How big is array? */ int vm_page_hash_mask; /* Mask for hash function */ simple_lock_data_t bucket_lock; /* lock for all buckets XXX */ diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index d3eb15c..761c0fe 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.44 1995/03/28 05:58:35 davidg Exp $ + * $Id: vm_pageout.c,v 1.45 1995/04/09 06:03:53 davidg Exp $ */ /* @@ -92,7 +92,7 @@ extern vm_map_t kmem_map; int vm_pages_needed; /* Event on which pageout daemon sleeps */ int vm_pagescanner; /* Event on which pagescanner sleeps */ -int vm_pageout_pages_needed = 0;/* flag saying that the pageout daemon needs pages */ +int vm_pageout_pages_needed; /* flag saying that the pageout daemon needs pages */ int vm_page_pagesfreed; extern int npendingio; @@ -113,7 +113,7 @@ extern int vfs_update_wakeup; int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT; int vm_pageout_req_do_stats; -int vm_page_max_wired = 0; /* XXX max # of wired pages system-wide */ +int vm_page_max_wired; /* XXX max # of wired pages system-wide */ /* * vm_pageout_clean: |