Add ddb command 'show pginfo' which provides useful information about
a vm page, denoted either by an address of the struct vm_page, or, if the '/p' modifier is specified, by a physical address of the corresponding frame. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
6d5ae34a44
commit
4fab678be2
@ -2884,4 +2884,27 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info)
|
||||
*vm_pagequeues[PQ_ACTIVE].pq_cnt,
|
||||
*vm_pagequeues[PQ_INACTIVE].pq_cnt);
|
||||
}
|
||||
|
||||
DB_SHOW_COMMAND(pginfo, vm_page_print_pginfo)
|
||||
{
|
||||
vm_page_t m;
|
||||
boolean_t phys;
|
||||
|
||||
if (!have_addr) {
|
||||
db_printf("show pginfo addr\n");
|
||||
return;
|
||||
}
|
||||
|
||||
phys = strchr(modif, 'p') != NULL;
|
||||
if (phys)
|
||||
m = PHYS_TO_VM_PAGE(addr);
|
||||
else
|
||||
m = (vm_page_t)addr;
|
||||
db_printf(
|
||||
"page %p obj %p pidx 0x%jx phys 0x%jx q %d hold %d wire %d\n"
|
||||
" af 0x%x of 0x%x f 0x%x act %d busy %d valid 0x%x dirty 0x%x\n",
|
||||
m, m->object, (uintmax_t)m->pindex, (uintmax_t)m->phys_addr,
|
||||
m->queue, m->hold_count, m->wire_count, m->aflags, m->oflags,
|
||||
m->flags, m->act_count, m->busy, m->valid, m->dirty);
|
||||
}
|
||||
#endif /* DDB */
|
||||
|
Loading…
x
Reference in New Issue
Block a user