diff options
author | grog <grog@FreeBSD.org> | 1999-08-14 04:56:14 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-08-14 04:56:14 +0000 |
commit | 4e587dfae44f93451453de52e80c031df3976774 (patch) | |
tree | 8ff8dea395cf0ca27ebda6a10eb996a46694c049 /sys/modules/vinum | |
parent | 0fd5df0f1306f1be17bd9a99e4f7c97262118a5e (diff) | |
download | FreeBSD-src-4e587dfae44f93451453de52e80c031df3976774.zip FreeBSD-src-4e587dfae44f93451453de52e80c031df3976774.tar.gz |
Bring up to date to work with -CURRENT.
Diffstat (limited to 'sys/modules/vinum')
-rw-r--r-- | sys/modules/vinum/.gdbinit.kernel | 26 | ||||
-rw-r--r-- | sys/modules/vinum/.gdbinit.vinum | 101 |
2 files changed, 108 insertions, 19 deletions
diff --git a/sys/modules/vinum/.gdbinit.kernel b/sys/modules/vinum/.gdbinit.kernel index 1502d9f..ecef651 100644 --- a/sys/modules/vinum/.gdbinit.kernel +++ b/sys/modules/vinum/.gdbinit.kernel @@ -1,4 +1,5 @@ set remotebaud 38400 +set remotetimeout 1 set complaints 1 set print pretty define xi @@ -226,13 +227,22 @@ Print the command name of the current process end define bpp set $bp = (struct buf *) $arg0 - printf " Buffer at 0x%x: dev 0x%x data 0x%x bcount 0x%x blkno 0x%x resid 0x%x\n", \ - $bp, \ - $bp->b_dev, \ - $bp->b_data, \ - $bp->b_bcount, \ - $bp->b_blkno, \ - $bp->b_resid + if $bp->b_dev + printf " Buffer at 0x%x: dev 0x%x data 0x%x bcount 0x%x blkno 0x%x resid 0x%x\n", \ + $bp, \ + $bp->b_dev->si_udev, \ + $bp->b_data, \ + $bp->b_bcount, \ + $bp->b_blkno, \ + $bp->b_resid + else + printf " Buffer at 0x%x: dev (none) data 0x%x bcount 0x%x blkno 0x%x resid 0x%x\n", \ + $bp, \ + $bp->b_data, \ + $bp->b_bcount, \ + $bp->b_blkno, \ + $bp->b_resid + end printf " flags 0x%x: ", $bp->b_flags if $bp->b_flags & 0x10 printf "busy " @@ -599,7 +609,7 @@ set height 70 set width 120 define vdev if (vp->v_type == VBLK) - p *vp->v_un.vu_specinfo + p *vp->v_un.vu_spec.vu_specinfo printf "numoutput: %d\n", vp->v_numoutput else echo "Not a block device" diff --git a/sys/modules/vinum/.gdbinit.vinum b/sys/modules/vinum/.gdbinit.vinum index c496275..79838e0 100644 --- a/sys/modules/vinum/.gdbinit.vinum +++ b/sys/modules/vinum/.gdbinit.vinum @@ -140,29 +140,108 @@ p rqe->sectors echo rqe->sdoffset p rqe->sdoffset end +# kernel equivalent of 'info -V' define rqi - set $rqipe = *VC->rqipp + set $rqipe = rqip set $rqip = $rqipe + 1 - set $rqend = VC->rqinfop + 32 + set $rqend = rqinfo + 128 if ($rqip == $rqend) - set $rqip = *VC->rqinfop + set $rqip = rqinfo end set $done = 0 while ($done == 0) - printf "%X:\t%d.%06d\tUBP: %x\t", $rqip, $rqip->timestamp.tv_sec, $rqip->timestamp.tv_usec, $rqip->bp - p $rqip->type - bpp $rqip->bp - if ($rqip->type < loginfo_rqe) - bpp &$rqip->info - else - rrqe &$rqip->info + if ($rqip->bp != 0) + printf "%X:\t%d.%06d\tUBP: %x\t", $rqip, $rqip->timestamp.tv_sec, $rqip->timestamp.tv_usec, $rqip->bp + p $rqip->type + printf " user " + bpp $rqip->bp + if ($rqip->type < loginfo_rqe) + printf " copied" + bpp &$rqip->info + else + rrqe &$rqip->info + end end set $rqip = $rqip + 1 if ($rqip == $rqipe) set $done = 1 end if ($rqip == $rqend) - set $rqip = VC->rqinfop + set $rqip = rqinfo end end end +define rrqi + set $rqipe = rqip + set $rqip = $rqipe + 1 + set $rqend = rqinfo + 128 + if ($rqip == $rqend) + set $rqip = rqinfo + end + set $done = 0 + while ($done == 0) + if ($rqip->bp != 0) + printf "%d.%06d\t", $rqip->timestamp.tv_sec, $rqip->timestamp.tv_usec + if ($rqip->type == loginfo_user_bp) + if ($rqip->info.b.b_flags & 0x00100000) + printf "1VS Read" + else + printf "1VS Write" + end + printf "\t%p\t%d.%d\t0x%-9x\t%ld\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.b.b_blkno, $rqip->info.b.b_bcount + end + + if ($rqip->type == loginfo_user_bpl) + if ($rqip->info.b.b_flags & 0x00100000) + printf "2LR Read" + else + printf "2LR Write" + end + printf "\t%p\t%d.%d\t0x%-9x\t%ld\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.b.b_blkno, $rqip->info.b.b_bcount + end + + if ($rqip->type == loginfo_rqe) + if ($rqip->info.b.b_flags & 0x00100000) + printf "3RQ Read" + else + printf "3RQ Write" + end + printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset + end + + if ($rqip->type == loginfo_iodone) + if ($rqip->info.b.b_flags & 0x00100000) + printf "4DN Read" + else + printf "4DN Write" + end + printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset + end + + if ($rqip->type == loginfo_raid5_data) + if ($rqip->info.b.b_flags & 0x00100000) + printf "5RD Read" + else + printf "5RD Write" + end + printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset + end + + if ($rqip->type == loginfo_raid5_parity) + if ($rqip->info.b.b_flags & 0x00100000) + printf "6RP Read" + else + printf "6RP Write" + end + printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset + end + end + set $rqip = $rqip + 1 + if ($rqip == $rqipe) + set $done = 1 + end + if ($rqip == $rqend) + set $rqip = rqinfo + end + end +end |