root@openindiana:/home/sergey/mmap# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc pcplusmp scsi_vhci zfs sata sd ip hook neti sockfs arp usba stmf stmf_sbd lofs random idm crypto sppp ipc ptm ]
> ::pgrep mmap
S    PID   PPID   PGID    SID    UID      FLAGS             ADDR NAME
R   1686   1647   1686   1647    101 0x4a004000 ffffff0159665050 mmap
> ffffff0159665050::print -t proc_t
proc_t {
    struct vnode *p_exec = 0xffffff0159716c00
    struct as *p_as = 0xffffff0158223110
    struct plock *p_lockp = 0xffffff014ab76600
    kmutex_t p_crlock = {
        void *[1] _opaque = [ 0 ]
    }
    struct cred *p_cred = 0xffffff0156349250
    int p_swapcnt = 0
    char p_stat = '\002'
    char p_wcode = '\0'
    ushort_t p_pidflag = 0
    int p_wdata = 0
    pid_t p_ppid = 0x66f
    struct proc *p_link = 0
    struct proc *p_parent = 0xffffff0156497058
    struct proc *p_child = 0
    struct proc *p_sibling = 0
    struct proc *p_psibling = 0
    struct proc *p_sibling_ns = 0
    struct proc *p_child_ns = 0
    struct proc *p_next = 0xffffff015253d0b8
    struct proc *p_prev = 0xffffff0159143030
> 0xffffff0158223110::print -t 'struct as'
struct as {
    kmutex_t a_contents = {
        void *[1] _opaque = [ 0 ]
    }
    uchar_t a_flags = 0
    uchar_t a_vbits = 0
    kcondvar_t a_cv = {
        ushort_t _opaque = 0
    }
    struct hat *a_hat = 0xffffff0157c3d230
    struct hrmstat *a_hrm = 0
    caddr_t a_userlimit = 0xfefff000
    struct seg *a_seglast = 0xffffff01591a20d0
    krwlock_t a_lock = {
        void *[1] _opaque = [ 0 ]
    }
    size_t a_size = 0x189000
    struct seg *a_lastgap = 0xffffff01591a22b0
    struct seg *a_lastgaphl = 0
    avl_tree_t a_segtree = {
        struct avl_node *avl_root = 0xffffff0159184480
        int (*)() avl_compar = as_segcompar
        size_t avl_offset = 0x20
> 0xffffff0157c3d230::print 'struct hat'
{
    hat_mutex = {
        _opaque = [ 0 ]
    }
    hat_as = 0xffffff0158223110
    hat_stats = 0
    hat_pages_mapped = [ 0x109, 0, 0xbaddcafebaddcafe ]
    hat_ism_pgcnt = 0
    hat_cpus = {
        cpub = [ 0, 0, 0, 0 ]
    }
    hat_flags = 0x2
    hat_htable = 0xffffff015941e468
    hat_next = 0xffffff0149472638
    hat_prev = 0xffffff0157c3d2e0
    hat_num_hash = 0x200
    hat_ht_hash = 0xffffff0159664000
    hat_ht_cached = 0
    hat_vlp_ptes = [ 0x73f02027, 0, 0, 0x4f904027 ]
}
> 0xffffff0157c3d230::print -t 'struct hat'
struct hat {
    kmutex_t hat_mutex = {
        void *[1] _opaque = [ 0 ]
    }
    struct as *hat_as = 0xffffff0158223110
    uint_t hat_stats = 0
    pgcnt_t [3] hat_pages_mapped = [ 0x109, 0, 0xbaddcafebaddcafe ]
    pgcnt_t hat_ism_pgcnt = 0
    cpuset_t hat_cpus = {
        ulong_t [4] cpub = [ 0, 0, 0, 0 ]
    }
    uint16_t hat_flags = 0x2
    htable_t *hat_htable = 0xffffff015941e468
    struct hat *hat_next = 0xffffff0149472638
    struct hat *hat_prev = 0xffffff0157c3d2e0
    uint_t hat_num_hash = 0x200
    htable_t **hat_ht_hash = 0xffffff0159664000
    htable_t *hat_ht_cached = 0
    x86pte_t [4] hat_vlp_ptes = [ 0x73f02027, 0, 0, 0x4f904027 ]
}
> 0x73f02027::pte
pte=73f02027: pfn=0x73f02 user write 
> 0x4f904027::pte
pte=4f904027: pfn=0x4f904 user write 
> 0x4f904::ptable
htable=ffffff015941e6a8
[503] va=fee00000 pte=69785027: pfn=0x69785 ref user write 
> 0x73f02::ptable
htable=ffffff015941e4b0
[ 64] va=8000000 pte=5dd03027: pfn=0x5dd03 ref user write 
> 0x5dd03::ptable
htable=ffffff015941e3d8
[ 70] va=8046000 pte=72ad7067: pfn=0x72ad7 user write 
[ 71] va=8047000 pte=4c458067: pfn=0x4c458 user write 
[ 80] va=8050000 pte=68561025: pfn=0x68561 user 
[ 96] va=8060000 pte=69f71067: pfn=0x69f71 user write 
[ 97] va=8061000 pte=6c272067: pfn=0x6c272 user write 
> 0x69f71::ptable
Unknown pagetable - assuming level/addr 0[  0] va=0 pte=6010101464c457f: pfn=0x
10101464c4 noconsist global user write uncached
[  1] va=1000 pte=1: pfn=0x0 
[  2] va=2000 pte=100030002: pfn=0x100030 write  !VALID 
[  3] va=3000 pte=3408050b8c: pfn=0x3408050 nosync global user wrthru !VALID 
[  4] va=4000 pte=1c88: pfn=0x1 noconsist wrthru !VALID 
[  5] va=5000 pte=28000700200034: pfn=0x8000700200 user uncached !VALID 
[  6] va=6000 pte=600200021: pfn=0x600200 
[  7] va=7000 pte=805003400000034: pfn=0x5003400000 user uncached !VALID 
[  8] va=8000 pte=e000000000: pfn=0xe000000  !VALID 
[  9] va=9000 pte=5000000e0: pfn=0x500000 wrback !VALID 
[ 10] va=a000 pte=300000000: pfn=0x300000  !VALID 
[ 11] va=b000 pte=805011400000114: pfn=0x5011400000 global user uncached !VALID 
[ 12] va=c000 pte=1100000000: pfn=0x1100000  !VALID 
[ 13] va=d000 pte=400000011: pfn=0x400000 uncached
[ 14] va=e000 pte=6ffffffd00000000: pfn=0xffffd00000  !VALID 
[ 15] va=f000 pte=805012800000128: pfn=0x5012800000 global wrthru !VALID 
[ 16] va=10000 pte=1000000000: pfn=0x1000000  !VALID 
[ 17] va=11000 pte=400000010: pfn=0x400000 uncached !VALID 
[ 18] va=12000 pte=100000000: pfn=0x100000  !VALID 
[ 19] va=13000 pte=805000000000000: pfn=0x5000000000  !VALID 
[ 20] va=14000 pte=ece00000000: pfn=0xece00000  !VALID 
[ 21] va=15000 pte=500000ece: pfn=0x500000 noconsist nosync user write wrthru
> 0x5dd03::ptable
htable=ffffff015941e3d8
[ 70] va=8046000 pte=72ad7067: pfn=0x72ad7 user write 
[ 71] va=8047000 pte=4c458067: pfn=0x4c458 user write 
[ 80] va=8050000 pte=68561025: pfn=0x68561 user 
[ 96] va=8060000 pte=69f71067: pfn=0x69f71 user write 
[ 97] va=8061000 pte=6c272067: pfn=0x6c272 user write 
> 72ad7067::pte
pte=72ad7067: pfn=0x72ad7 user write 
> 0x5dd03000,200\K
0x5dd03000:     0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               72ad7067        4c458067
                0               0               0               0
                0               0               0               0
                68561025        0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                69f71067        6c272067        0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
                0               0               0               0
> ::print htable_t
{
    ht_next 
    ht_hat 
    ht_vaddr 
    ht_level 
    ht_flags 
    ht_busy 
    ht_valid_cnt 
    ht_lock_cnt 
    ht_pfn 
    ht_prev 
    ht_parent 
    ht_shares 
}
> ::print -t htable_t
htable_t {
    struct htable *ht_next 
    struct hat *ht_hat 
    uintptr_t ht_vaddr 
    int8_t ht_level 
    uint8_t ht_flags 
    int16_t ht_busy 
    int16_t ht_valid_cnt 
    uint32_t ht_lock_cnt 
    pfn_t ht_pfn 
    struct htable *ht_prev 
    struct htable *ht_parent 
    struct htable *ht_shares 
}
> 0xffffff0157c3d230::print -t 'struct hat'
struct hat {
    kmutex_t hat_mutex = {
        void *[1] _opaque = [ 0 ]
    }
    struct as *hat_as = 0xffffff0158223110
    uint_t hat_stats = 0
    pgcnt_t [3] hat_pages_mapped = [ 0x109, 0, 0xbaddcafebaddcafe ]
    pgcnt_t hat_ism_pgcnt = 0
    cpuset_t hat_cpus = {
        ulong_t [4] cpub = [ 0, 0, 0, 0 ]
    }
    uint16_t hat_flags = 0x2
    htable_t *hat_htable = 0xffffff015941e468
    struct hat *hat_next = 0xffffff0149472638
    struct hat *hat_prev = 0xffffff0157c3d2e0
    uint_t hat_num_hash = 0x200
    htable_t **hat_ht_hash = 0xffffff0159664000
    htable_t *hat_ht_cached = 0
    x86pte_t [4] hat_vlp_ptes = [ 0x73f02027, 0, 0, 0x4f904027 ]
}
> 0xffffff015941e468::print -t htable_t
htable_t {
    struct htable *ht_next = 0
    struct hat *ht_hat = 0xffffff0157c3d230
    uintptr_t ht_vaddr = 0
    int8_t ht_level = '\002'
    uint8_t ht_flags = 0x1
    int16_t ht_busy = 0x3
    int16_t ht_valid_cnt = 0x2
    uint32_t ht_lock_cnt = 0
    pfn_t ht_pfn = 0xffffffffffffffff
    struct htable *ht_prev = 0
    struct htable *ht_parent = 0
    struct htable *ht_shares = 0
}
> 

