dumpsys: don't spew numbers into the log.

This commit is contained in:
ad 2008-11-25 15:51:34 +00:00
parent 5222358697
commit 93ea4650a6
15 changed files with 51 additions and 48 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.310 2008/11/19 18:35:57 ad Exp $ */ /* $NetBSD: machdep.c,v 1.311 2008/11/25 15:51:34 ad Exp $ */
/*- /*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.310 2008/11/19 18:35:57 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.311 2008/11/25 15:51:34 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -1252,7 +1252,8 @@ dumpsys()
/* Print out how many MBs we to go. */ /* Print out how many MBs we to go. */
if ((totalbytesleft % (1024*1024)) == 0) if ((totalbytesleft % (1024*1024)) == 0)
printf("%ld ", totalbytesleft / (1024 * 1024)); printf_nolog("%ld ",
totalbytesleft / (1024 * 1024));
/* Limit size for next transfer. */ /* Limit size for next transfer. */
n = bytes - i; n = bytes - i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.210 2008/11/12 12:35:56 ad Exp $ */ /* $NetBSD: machdep.c,v 1.211 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California. * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -85,7 +85,7 @@
#include "opt_panicbutton.h" #include "opt_panicbutton.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.210 2008/11/12 12:35:56 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211 2008/11/25 15:51:34 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -704,7 +704,7 @@ dumpsys()
/* Print out how many MBs we have to go. */ /* Print out how many MBs we have to go. */
n = bytes - i; n = bytes - i;
if (n && (n % (1024 * 1024)) == 0) if (n && (n % (1024 * 1024)) == 0)
printf("%d ", n / (1024 * 1024)); printf_nolog("%d ", n / (1024 * 1024));
/* Limit size for next transfer. */ /* Limit size for next transfer. */
if (n > BYTES_PER_DUMP) if (n > BYTES_PER_DUMP)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.152 2008/11/12 12:35:57 ad Exp $ */ /* $NetBSD: machdep.c,v 1.153 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California. * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -77,7 +77,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.152 2008/11/12 12:35:57 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.153 2008/11/25 15:51:34 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_compat_netbsd.h" #include "opt_compat_netbsd.h"
@ -575,7 +575,7 @@ dumpsys(void)
*/ */
n = nbytes - i; n = nbytes - i;
if (n && (n % (1024*1024)) == 0) if (n && (n % (1024*1024)) == 0)
printf("%d ", n / (1024 * 1024)); printf_nolog("%d ", n / (1024 * 1024));
/* /*
* Limit transfer to BYTES_PER_DUMP * Limit transfer to BYTES_PER_DUMP

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.52 2008/11/25 15:50:52 skrll Exp $ */ /* $NetBSD: machdep.c,v 1.53 2008/11/25 15:51:34 ad Exp $ */
/*- /*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -63,7 +63,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.52 2008/11/25 15:50:52 skrll Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2008/11/25 15:51:34 ad Exp $");
#include "opt_cputype.h" #include "opt_cputype.h"
#include "opt_ddb.h" #include "opt_ddb.h"
@ -1633,7 +1633,7 @@ dumpsys(void)
/* Print out how many MBs we are to go. */ /* Print out how many MBs we are to go. */
n = bytes - i; n = bytes - i;
if (n && (n % (1024*1024)) == 0) if (n && (n % (1024*1024)) == 0)
printf("%d ", n / (1024 * 1024)); printf_nolog("%d ", n / (1024 * 1024));
/* Limit size for next transfer. */ /* Limit size for next transfer. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dumpsys.c,v 1.4 2008/04/28 20:23:24 martin Exp $ */ /* $NetBSD: dumpsys.c,v 1.5 2008/11/25 15:51:34 ad Exp $ */
/*- /*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc.
@ -69,7 +69,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dumpsys.c,v 1.4 2008/04/28 20:23:24 martin Exp $"); __KERNEL_RCSID(0, "$NetBSD: dumpsys.c,v 1.5 2008/11/25 15:51:34 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -654,7 +654,7 @@ dumpsys_seg(paddr_t maddr, paddr_t bytes)
for (i = 0; i < bytes; i += n, dump_totalbytesleft -= n) { for (i = 0; i < bytes; i += n, dump_totalbytesleft -= n) {
/* Print out how many MBs we have left to go. */ /* Print out how many MBs we have left to go. */
if ((dump_totalbytesleft % (1024*1024)) == 0) if ((dump_totalbytesleft % (1024*1024)) == 0)
printf("%lu ", (unsigned long) printf_nolog("%lu ", (unsigned long)
(dump_totalbytesleft / (1024 * 1024))); (dump_totalbytesleft / (1024 * 1024)));
/* Limit size for next transfer. */ /* Limit size for next transfer. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mips_machdep.c,v 1.205 2008/10/17 00:46:07 uebayasi Exp $ */ /* $NetBSD: mips_machdep.c,v 1.206 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright 2002 Wasabi Systems, Inc. * Copyright 2002 Wasabi Systems, Inc.
@ -112,7 +112,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205 2008/10/17 00:46:07 uebayasi Exp $"); __KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.206 2008/11/25 15:51:34 ad Exp $");
#include "opt_cputype.h" #include "opt_cputype.h"
@ -1423,7 +1423,8 @@ dumpsys(void)
for (i = 0; i < bytes; i += n, totalbytesleft -= n) { for (i = 0; i < bytes; i += n, totalbytesleft -= n) {
/* Print out how many MBs we have left to go. */ /* Print out how many MBs we have left to go. */
if ((totalbytesleft % (1024*1024)) == 0) if ((totalbytesleft % (1024*1024)) == 0)
printf("%ld ", totalbytesleft / (1024 * 1024)); printf_nolog("%ld ",
totalbytesleft / (1024 * 1024));
/* Limit size for next transfer. */ /* Limit size for next transfer. */
n = bytes - i; n = bytes - i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.131 2008/11/12 12:36:04 ad Exp $ */ /* $NetBSD: machdep.c,v 1.132 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990, 1993 * Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.131 2008/11/12 12:36:04 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.132 2008/11/25 15:51:34 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_m060sp.h" #include "opt_m060sp.h"
@ -1008,7 +1008,8 @@ dumpsys(void)
/* Print out how many MBs we have left to go. */ /* Print out how many MBs we have left to go. */
if ((totalbytesleft % (1024*1024)) == 0) if ((totalbytesleft % (1024*1024)) == 0)
printf("%ld ", totalbytesleft / (1024 * 1024)); printf_nolog("%ld ",
totalbytesleft / (1024 * 1024));
/* Limit size for next transfer. */ /* Limit size for next transfer. */
n = bytes - i; n = bytes - i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.74 2008/11/12 12:36:04 ad Exp $ */ /* $NetBSD: machdep.c,v 1.75 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990, 1993 * Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2008/11/12 12:36:04 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.75 2008/11/25 15:51:34 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_compat_netbsd.h" #include "opt_compat_netbsd.h"
@ -631,7 +631,7 @@ dumpsys(void)
#define NPGMB (1024*1024/PAGE_SIZE) #define NPGMB (1024*1024/PAGE_SIZE)
/* print out how many MBs we have dumped */ /* print out how many MBs we have dumped */
if (pg && (pg % NPGMB) == 0) if (pg && (pg % NPGMB) == 0)
printf("%d ", pg / NPGMB); printf_nolog("%d ", pg / NPGMB);
#undef NPGMB #undef NPGMB
pmap_enter(pmap_kernel(), (vaddr_t)vmmap, maddr, pmap_enter(pmap_kernel(), (vaddr_t)vmmap, maddr,
VM_PROT_READ, VM_PROT_READ|PMAP_WIRED); VM_PROT_READ, VM_PROT_READ|PMAP_WIRED);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.87 2008/11/12 12:36:05 ad Exp $ */ /* $NetBSD: machdep.c,v 1.88 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright (c) 1998 Darrin B. Jewell * Copyright (c) 1998 Darrin B. Jewell
@ -79,7 +79,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.87 2008/11/12 12:36:05 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.88 2008/11/25 15:51:34 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -782,7 +782,7 @@ dumpsys(void)
#define NPGMB (1024*1024/PAGE_SIZE) #define NPGMB (1024*1024/PAGE_SIZE)
/* print out how many MBs we have dumped */ /* print out how many MBs we have dumped */
if (pg && (pg % NPGMB) == 0) if (pg && (pg % NPGMB) == 0)
printf("%d ", pg / NPGMB); printf_nolog("%d ", pg / NPGMB);
#undef NPGMB #undef NPGMB
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, maddr, pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, maddr,
VM_PROT_READ, VM_PROT_READ|PMAP_WIRED); VM_PROT_READ, VM_PROT_READ|PMAP_WIRED);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.284 2008/11/19 18:36:01 ad Exp $ */ /* $NetBSD: machdep.c,v 1.285 2008/11/25 15:51:34 ad Exp $ */
/*- /*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.284 2008/11/19 18:36:01 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.285 2008/11/25 15:51:34 ad Exp $");
#include "opt_compat_netbsd.h" #include "opt_compat_netbsd.h"
#include "opt_compat_sunos.h" #include "opt_compat_sunos.h"
@ -1044,7 +1044,7 @@ dumpsys(void)
/* print out how many MBs we have dumped */ /* print out how many MBs we have dumped */
if (i && (i % (1024*1024)) == 0) if (i && (i % (1024*1024)) == 0)
printf("%d ", i / (1024*1024)); printf_nolog("%d ", i / (1024*1024));
(void) pmap_map(dumpspace, maddr, maddr + n, (void) pmap_map(dumpspace, maddr, maddr + n,
VM_PROT_READ); VM_PROT_READ);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.229 2008/11/19 18:36:01 ad Exp $ */ /* $NetBSD: machdep.c,v 1.230 2008/11/25 15:51:34 ad Exp $ */
/*- /*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.229 2008/11/19 18:36:01 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.230 2008/11/25 15:51:34 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_multiprocessor.h" #include "opt_multiprocessor.h"
@ -786,7 +786,7 @@ dumpsys()
/* print out how many MBs we still have to dump */ /* print out how many MBs we still have to dump */
if ((todo % (1024*1024)) == 0) if ((todo % (1024*1024)) == 0)
printf("\r%6" PRIu64 " M ", printf_nolog("\r%6" PRIu64 " M ",
todo / (1024*1024)); todo / (1024*1024));
for (off = 0; off < n; off += PAGE_SIZE) for (off = 0; off < n; off += PAGE_SIZE)
pmap_kenter_pa(dumpspace+off, maddr+off, pmap_kenter_pa(dumpspace+off, maddr+off,

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.55 2008/11/12 12:36:08 ad Exp $ */ /* $NetBSD: machdep.c,v 1.56 2008/11/25 15:51:34 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990, 1993 * Copyright (c) 1982, 1986, 1990, 1993
@ -153,7 +153,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2008/11/12 12:36:08 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2008/11/25 15:51:34 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -760,7 +760,7 @@ dumpsys(void)
chunk = todo; chunk = todo;
do { do {
if ((todo & 0xf) == 0) if ((todo & 0xf) == 0)
printf("\r%4d", todo); printf_nolog("\r%4d", todo);
vaddr = (char*)(paddr + KERNBASE); vaddr = (char*)(paddr + KERNBASE);
error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE); error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE);
if (error) if (error)
@ -774,7 +774,7 @@ dumpsys(void)
vaddr = (char*)vmmap; /* Borrow /dev/mem VA */ vaddr = (char*)vmmap; /* Borrow /dev/mem VA */
do { do {
if ((todo & 0xf) == 0) if ((todo & 0xf) == 0)
printf("\r%4d", todo); printf_nolog("\r%4d", todo);
pmap_kenter_pa(vmmap, paddr | PMAP_NC, VM_PROT_READ); pmap_kenter_pa(vmmap, paddr | PMAP_NC, VM_PROT_READ);
pmap_update(pmap_kernel()); pmap_update(pmap_kernel());
error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE); error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.187 2008/11/12 12:36:08 ad Exp $ */ /* $NetBSD: machdep.c,v 1.188 2008/11/25 15:51:35 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990, 1993 * Copyright (c) 1982, 1986, 1990, 1993
@ -78,7 +78,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.187 2008/11/12 12:36:08 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.188 2008/11/25 15:51:35 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -674,7 +674,7 @@ dumpsys(void)
chunk = todo; chunk = todo;
do { do {
if ((todo & 0xf) == 0) if ((todo & 0xf) == 0)
printf("\r%4d", todo); printf_nolog("\r%4d", todo);
vaddr = (char*)(paddr + KERNBASE); vaddr = (char*)(paddr + KERNBASE);
error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE); error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE);
if (error) if (error)
@ -688,7 +688,7 @@ dumpsys(void)
vaddr = (char*)vmmap; /* Borrow /dev/mem VA */ vaddr = (char*)vmmap; /* Borrow /dev/mem VA */
do { do {
if ((todo & 0xf) == 0) if ((todo & 0xf) == 0)
printf("\r%4d", todo); printf_nolog("\r%4d", todo);
pmap_kenter_pa(vmmap, paddr | PMAP_NC, VM_PROT_READ); pmap_kenter_pa(vmmap, paddr | PMAP_NC, VM_PROT_READ);
pmap_update(pmap_kernel()); pmap_update(pmap_kernel());
error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE); error = (*dsw->d_dump)(dumpdev, blkno, vaddr, PAGE_SIZE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.113 2008/11/12 12:36:08 ad Exp $ */ /* $NetBSD: machdep.c,v 1.114 2008/11/25 15:51:35 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990, 1993 * Copyright (c) 1982, 1986, 1990, 1993
@ -75,7 +75,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.113 2008/11/12 12:36:08 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2008/11/25 15:51:35 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -683,7 +683,7 @@ dumpsys(void)
/* Print pages left after every 16. */ /* Print pages left after every 16. */
if ((todo & 0xf) == 0) if ((todo & 0xf) == 0)
printf("\r%4d", todo); printf_nolog("\r%4d", todo);
/* Make a temporary mapping for the page. */ /* Make a temporary mapping for the page. */
pmap_kenter_pa(vmmap, paddr | PMAP_NC, VM_PROT_READ); pmap_kenter_pa(vmmap, paddr | PMAP_NC, VM_PROT_READ);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.152 2008/11/12 12:36:09 ad Exp $ */ /* $NetBSD: machdep.c,v 1.153 2008/11/25 15:51:35 ad Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1990, 1993 * Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.152 2008/11/12 12:36:09 ad Exp $"); __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.153 2008/11/25 15:51:35 ad Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -744,7 +744,7 @@ dumpsys(void)
#define NPGMB (1024*1024/PAGE_SIZE) #define NPGMB (1024*1024/PAGE_SIZE)
/* print out how many MBs we have dumped */ /* print out how many MBs we have dumped */
if (pg && (pg % NPGMB) == 0) if (pg && (pg % NPGMB) == 0)
printf("%d ", pg / NPGMB); printf_nolog("%d ", pg / NPGMB);
#undef NPGMB #undef NPGMB
if (maddr == 0) { if (maddr == 0) {
/* Skip first page */ /* Skip first page */