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): Sprinkle more info into hint/orig_hint asser...



details:   https://anonhg.NetBSD.org/src/rev/b90bfa5a3cb8
branches:  trunk
changeset: 366654:b90bfa5a3cb8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jun 04 23:26:05 2022 +0000

description:
uvm(9): Sprinkle more info into hint/orig_hint assertions.

May help to diagnose PR kern/51254.

diffstat:

 sys/uvm/uvm_map.c |  22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diffs (43 lines):

diff -r 8f7015a61328 -r b90bfa5a3cb8 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sat Jun 04 23:09:57 2022 +0000
+++ b/sys/uvm/uvm_map.c Sat Jun 04 23:26:05 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.397 2022/06/04 23:09:57 riastradh Exp $  */
+/*     $NetBSD: uvm_map.c,v 1.398 2022/06/04 23:26:05 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.397 2022/06/04 23:09:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.398 2022/06/04 23:26:05 riastradh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -2150,10 +2150,20 @@
        SAVE_HINT(map, map->hint, entry);
        *result = hint;
        UVMHIST_LOG(maphist,"<- got it!  (result=%#jx)", hint, 0,0,0);
-       KASSERTMSG( topdown || hint >= orig_hint, "hint: %#jx, orig_hint: %#jx",
-           (uintmax_t)hint, (uintmax_t)orig_hint);
-       KASSERTMSG(!topdown || hint <= orig_hint, "hint: %#jx, orig_hint: %#jx",
-           (uintmax_t)hint, (uintmax_t)orig_hint);
+       KASSERTMSG( topdown || hint >= orig_hint,
+           "map=%p hint=%#"PRIxVADDR" orig_hint=%#"PRIxVADDR
+           " length=%#"PRIxVSIZE" uobj=%p uoffset=%#llx align=%"PRIxVSIZE
+           " flags=%#x",
+           map, hint, orig_hint,
+           length, uobj, (unsigned long long)uoffset, align,
+           flags);
+       KASSERTMSG(!topdown || hint <= orig_hint,
+           "map=%p hint=%#"PRIxVADDR" orig_hint=%#"PRIxVADDR
+           " length=%#"PRIxVSIZE" uobj=%p uoffset=%#llx align=%"PRIxVSIZE
+           " flags=%#x",
+           map, hint, orig_hint,
+           length, uobj, (unsigned long long)uoffset, align,
+           flags);
        KASSERT(entry->end <= hint);
        KASSERT(hint + length <= entry->next->start);
        return (entry);



Home | Main Index | Thread Index | Old Index