Add 'v' modifier to the ddb 'show pginfo' command to display vm_page

backing the provided kernel virtual address.

Tested by:	pho
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
kib 2018-12-30 15:58:18 +00:00
parent 2b57a62df3
commit d57c248b7d

View File

@ -4493,7 +4493,7 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info)
DB_SHOW_COMMAND(pginfo, vm_page_print_pginfo)
{
vm_page_t m;
boolean_t phys;
boolean_t phys, virt;
if (!have_addr) {
db_printf("show pginfo addr\n");
@ -4501,7 +4501,10 @@ DB_SHOW_COMMAND(pginfo, vm_page_print_pginfo)
}
phys = strchr(modif, 'p') != NULL;
if (phys)
virt = strchr(modif, 'v') != NULL;
if (virt)
m = PHYS_TO_VM_PAGE(pmap_kextract(addr));
else if (phys)
m = PHYS_TO_VM_PAGE(addr);
else
m = (vm_page_t)addr;