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:
Konstantin Belousov 2018-12-30 15:58:18 +00:00
parent fb1ec6a981
commit 7af4985245
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342630

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;