Module Name: src
Committed By: riastradh
Date: Sat Jun 4 23:09:57 UTC 2022
Modified Files:
src/sys/uvm: uvm_map.c
Log Message:
uvm(9): Print min/max address and first_free entry in ddb `show map'.
May help to diagnose PR kern/51254.
To generate a diff of this commit:
cvs rdiff -u -r1.396 -r1.397 src/sys/uvm/uvm_map.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.396 src/sys/uvm/uvm_map.c:1.397
--- src/sys/uvm/uvm_map.c:1.396 Sat Jun 4 20:54:53 2022
+++ src/sys/uvm/uvm_map.c Sat Jun 4 23:09:57 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.396 2022/06/04 20:54:53 riastradh Exp $ */
+/* $NetBSD: uvm_map.c,v 1.397 2022/06/04 23:09:57 riastradh Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.396 2022/06/04 20:54:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.397 2022/06/04 23:09:57 riastradh Exp $");
#include "opt_ddb.h"
#include "opt_pax.h"
@@ -5116,6 +5116,8 @@ uvm_map_printit(struct vm_map *map, bool
pmap_resident_count(map->pmap), pmap_wired_count(map->pmap));
if (!full)
return;
+ (*pr)("\tmin=%"PRIxVADDR", max=%"PRIxVADDR"\n",
+ vm_map_min(map), vm_map_max(map));
for (entry = map->header.next; entry != &map->header;
entry = entry->next) {
(*pr)(" - %p: %#lx->%#lx: obj=%p/%#llx, amap=%p/%d\n",
@@ -5124,12 +5126,13 @@ uvm_map_printit(struct vm_map *map, bool
entry->aref.ar_pageoff);
(*pr)(
"\tsubmap=%c, cow=%c, nc=%c, prot(max)=%d/%d, inh=%d, "
- "wc=%d, adv=%d\n",
+ "wc=%d, adv=%d%s\n",
(entry->etype & UVM_ET_SUBMAP) ? 'T' : 'F',
(entry->etype & UVM_ET_COPYONWRITE) ? 'T' : 'F',
(entry->etype & UVM_ET_NEEDSCOPY) ? 'T' : 'F',
entry->protection, entry->max_protection,
- entry->inheritance, entry->wired_count, entry->advice);
+ entry->inheritance, entry->wired_count, entry->advice,
+ entry == map->first_free ? " (first_free)" : "");
}
}