The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/gdbscripts/kdump

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #       $NetBSD: kdump,v 1.2 1997/02/12 23:35:07 gwr Exp $
    2 
    3 # Dump kmem statistics
    4 #       @(#)kdump       8.1 (Berkeley) 6/10/93
    5 
    6 set $last=75
    7 set $seg=43
    8 
    9 # kmem_hdr
   10 define kmemhdr
   11         printf "\tINUSE\tCALLS\tMEMUSED\tLIMBLK\tMAPBLK\tMAXUSED\t\tLIMIT\n"
   12 end
   13 
   14 # pkmem <ptr>
   15 define pkmem
   16         set $kp=(struct kmemstats *)$arg0
   17         set $n = (struct kmemstats *)$kp - (struct kmemstats *)kmemstats
   18         printf "%d:\t%d\t%d", $n, $kp->ks_inuse, $kp->ks_calls
   19         printf "\t0x%x\t%d", $kp->ks_memuse, $kp->ks_limblocks
   20         printf "\t%d\t0x%x\t\t%d\n", $kp->ks_mapblocks, $kp->ks_maxused, $kp->ks_limit
   21 end
   22 
   23 define kmemdump
   24         set $kp=(struct kmemstats *)(kmemstats + $arg0)
   25         kmemhdr
   26         pkmem $kp
   27 end
   28 
   29 define kdumpall
   30         set $i=0
   31 
   32         kmemhdr
   33         set $kp = (struct kmemstats *)kmemstats
   34         while ($i < $last)
   35                 pkmem $kp
   36                 set $kp++
   37                 set $i++
   38         end
   39 end

Cache object: 047584783e93c421d57abdee108a2c4b


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.