Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Change two KASSERT to KASSERTMSG to provide better d...



details:   https://anonhg.NetBSD.org/src/rev/c542336f3ca7
branches:  trunk
changeset: 345975:c542336f3ca7
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jun 18 14:56:03 2016 +0000

description:
Change two KASSERT to KASSERTMSG to provide better diagnostics.

diffstat:

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

diffs (31 lines):

diff -r a9961e2a821f -r c542336f3ca7 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sat Jun 18 14:39:15 2016 +0000
+++ b/sys/uvm/uvm_map.c Sat Jun 18 14:56:03 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.338 2016/06/01 00:49:44 christos Exp $   */
+/*     $NetBSD: uvm_map.c,v 1.339 2016/06/18 14:56:03 martin 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.338 2016/06/01 00:49:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.339 2016/06/18 14:56:03 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -2110,8 +2110,10 @@
        SAVE_HINT(map, map->hint, entry);
        *result = hint;
        UVMHIST_LOG(maphist,"<- got it!  (result=%#lx)", hint, 0,0,0);
-       KASSERT( topdown || hint >= orig_hint);
-       KASSERT(!topdown || hint <= orig_hint);
+       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);
        KASSERT(entry->end <= hint);
        KASSERT(hint + length <= entry->next->start);
        return (entry);



Home | Main Index | Thread Index | Old Index