Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm uvm(9): Print min/max address and first_free entry i...



details:   https://anonhg.NetBSD.org/src/rev/8f7015a61328
branches:  trunk
changeset: 366653:8f7015a61328
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jun 04 23:09:57 2022 +0000

description:
uvm(9): Print min/max address and first_free entry in ddb `show map'.

May help to diagnose PR kern/51254.

diffstat:

 sys/uvm/uvm_map.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r c06d53d91c43 -r 8f7015a61328 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sat Jun 04 23:09:18 2022 +0000
+++ b/sys/uvm/uvm_map.c Sat Jun 04 23:09:57 2022 +0000
@@ -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 @@
            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 @@
                    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)" : "");
        }
 }
 



Home | Main Index | Thread Index | Old Index