Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe Add some debugging printfs.



details:   https://anonhg.NetBSD.org/src/rev/76f477a1d674
branches:  trunk
changeset: 480488:76f477a1d674
user:      oster <oster%NetBSD.org@localhost>
date:      Fri Jan 14 00:57:57 2000 +0000

description:
Add some debugging printfs.

diffstat:

 sys/dev/raidframe/rf_paritylogging.c |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (76 lines):

diff -r cc2062ef79c7 -r 76f477a1d674 sys/dev/raidframe/rf_paritylogging.c
--- a/sys/dev/raidframe/rf_paritylogging.c      Thu Jan 13 23:41:18 2000 +0000
+++ b/sys/dev/raidframe/rf_paritylogging.c      Fri Jan 14 00:57:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_paritylogging.c,v 1.8 2000/01/09 04:35:13 oster Exp $       */
+/*     $NetBSD: rf_paritylogging.c,v 1.9 2000/01/14 00:57:57 oster Exp $       */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -200,6 +200,8 @@
                raidPtr->numParityLogs = rf_numParityRegions;
 
        /* create region information structs */
+       printf("Allocating %d bytes for in-core parity region info\n",
+              (int) rf_numParityRegions * sizeof(RF_RegionInfo_t));
        RF_Malloc(raidPtr->regionInfo, 
                  (rf_numParityRegions * sizeof(RF_RegionInfo_t)), 
                  (RF_RegionInfo_t *));
@@ -222,6 +224,10 @@
     regionParityRange++; */
 
        /* build pool of unused parity logs */
+       printf("Allocating %d bytes for %d parity logs\n",
+              raidPtr->numParityLogs * raidPtr->numSectorsPerLog * 
+              raidPtr->bytesPerSector,
+              raidPtr->numParityLogs);
        RF_Malloc(raidPtr->parityLogBufferHeap, raidPtr->numParityLogs * 
                  raidPtr->numSectorsPerLog * raidPtr->bytesPerSector, 
                  (caddr_t));
@@ -325,6 +331,8 @@
                raidPtr->regionBufferPool.totalBuffers;
        raidPtr->regionBufferPool.availBuffersIndex = 0;
        raidPtr->regionBufferPool.emptyBuffersIndex = 0;
+       printf("Allocating %d bytes for regionBufferPool\n",
+              raidPtr->regionBufferPool.totalBuffers * sizeof(caddr_t));
        RF_Malloc(raidPtr->regionBufferPool.buffers, 
                  raidPtr->regionBufferPool.totalBuffers * sizeof(caddr_t), 
                  (caddr_t *));
@@ -334,6 +342,8 @@
                return (ENOMEM);
        }
        for (i = 0; i < raidPtr->regionBufferPool.totalBuffers; i++) {
+               printf("Allocating %d bytes for regionBufferPool#%d\n",
+                      raidPtr->regionBufferPool.bufferSize * sizeof(char), i);
                RF_Malloc(raidPtr->regionBufferPool.buffers[i], 
                          raidPtr->regionBufferPool.bufferSize * sizeof(char),
                          (caddr_t));
@@ -389,6 +399,9 @@
                raidPtr->parityBufferPool.totalBuffers;
        raidPtr->parityBufferPool.availBuffersIndex = 0;
        raidPtr->parityBufferPool.emptyBuffersIndex = 0;
+       printf("Allocating %d bytes for parityBufferPool of %d units\n",
+              raidPtr->parityBufferPool.totalBuffers * sizeof(caddr_t),
+              raidPtr->parityBufferPool.totalBuffers );
        RF_Malloc(raidPtr->parityBufferPool.buffers, 
                  raidPtr->parityBufferPool.totalBuffers * sizeof(caddr_t), 
                  (caddr_t *));
@@ -398,6 +411,8 @@
                return (ENOMEM);
        }
        for (i = 0; i < raidPtr->parityBufferPool.totalBuffers; i++) {
+               printf("Allocating %d bytes for parityBufferPool#%d\n",
+                      raidPtr->parityBufferPool.bufferSize * sizeof(char),i);
                RF_Malloc(raidPtr->parityBufferPool.buffers[i], 
                          raidPtr->parityBufferPool.bufferSize * sizeof(char),
                          (caddr_t));
@@ -513,6 +528,9 @@
                RF_ASSERT(raidPtr->regionInfo[i].parityStartAddr + 
                          raidPtr->regionInfo[i].numSectorsParity <= 
                          raidPtr->sectorsPerDisk);
+               printf("Allocating %d bytes for region %d\n",
+                      (int) (raidPtr->regionInfo[i].capacity *
+                          sizeof(RF_DiskMap_t)), i);
                RF_Malloc(raidPtr->regionInfo[i].diskMap, 
                          (raidPtr->regionInfo[i].capacity *
                           sizeof(RF_DiskMap_t)), 



Home | Main Index | Thread Index | Old Index