Module Name:    src
Committed By:   martin
Date:           Sat Jun 18 14:56:04 UTC 2016

Modified Files:
        src/sys/uvm: uvm_map.c

Log Message:
Change two KASSERT to KASSERTMSG to provide better diagnostics.


To generate a diff of this commit:
cvs rdiff -u -r1.338 -r1.339 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.338 src/sys/uvm/uvm_map.c:1.339
--- src/sys/uvm/uvm_map.c:1.338	Wed Jun  1 00:49:44 2016
+++ src/sys/uvm/uvm_map.c	Sat Jun 18 14:56:03 2016
@@ -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 @@ nextgap:
 	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);

Reply via email to