svn commit: r251048 - stable/9/sys/vm

Konstantin Belousov kib at FreeBSD.org
Tue May 28 05:22:45 UTC 2013


Author: kib
Date: Tue May 28 05:22:45 2013
New Revision: 251048
URL: http://svnweb.freebsd.org/changeset/base/251048

Log:
  MFC r250849:
  Add ddb command 'show pginfo'.

Modified:
  stable/9/sys/vm/vm_page.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/vm/vm_page.c
==============================================================================
--- stable/9/sys/vm/vm_page.c	Tue May 28 04:54:16 2013	(r251047)
+++ stable/9/sys/vm/vm_page.c	Tue May 28 05:22:45 2013	(r251048)
@@ -2915,4 +2915,27 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag
 		*vm_page_queues[PQ_ACTIVE].cnt,
 		*vm_page_queues[PQ_INACTIVE].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 */


More information about the svn-src-stable-9 mailing list