summaryrefslogtreecommitdiff
path: root/usr.sbin/procmap
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-06-09 20:30:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-06-09 20:30:26 +0000
commit2841d9faabe4c86665d799156297878ec3720e51 (patch)
tree3a96613ace1e9490f250100ba0b2002a60acc04b /usr.sbin/procmap
parentd8f4e7941f8eb932a31090a45c6ce1d41b93e1ec (diff)
Define a new flag, UVM_FLAG_HOLE, for uvm_map to create a vm_map_entry of
a new etype, UVM_ET_HOLE, meaning it has no backend. UVM_ET_HOLE entries (which should be created as UVM_PROT_NONE and with UVM_FLAG_NOMERGE and UVM_FLAG_HOLE) are skipped in uvm_unmap_remove(), so that pmap_{k,}remove() is not called on the entry. This is intended to save time, and behave better, on pmaps with MMU holes at process exit time. ok art@, kettenis@ provided feedback as well.
Diffstat (limited to 'usr.sbin/procmap')
-rw-r--r--usr.sbin/procmap/procmap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c
index fc0cad510d6..2140d7423ba 100644
--- a/usr.sbin/procmap/procmap.c
+++ b/usr.sbin/procmap/procmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procmap.c,v 1.27 2007/10/02 14:50:49 kettenis Exp $ */
+/* $OpenBSD: procmap.c,v 1.28 2008/06/09 20:30:25 miod Exp $ */
/* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */
/*
@@ -552,11 +552,12 @@ dump_vm_map_entry(kvm_t *kd, struct kbit *vmspace,
printf(" end = %lx,", vme->end);
printf(" object.uvm_obj/sub_map = %p,\n", vme->object.uvm_obj);
printf(" offset = %lx,", (unsigned long)vme->offset);
- printf(" etype = %x <%s%s%s%s >,", vme->etype,
+ printf(" etype = %x <%s%s%s%s%s >,", vme->etype,
vme->etype & UVM_ET_OBJ ? " OBJ" : "",
vme->etype & UVM_ET_SUBMAP ? " SUBMAP" : "",
vme->etype & UVM_ET_COPYONWRITE ? " COW" : "",
- vme->etype & UVM_ET_NEEDSCOPY ? " NEEDSCOPY" : "");
+ vme->etype & UVM_ET_NEEDSCOPY ? " NEEDSCOPY" : "",
+ vme->etype & UVM_ET_HOLE ? " HOLE" : "");
printf(" protection = %x,\n", vme->protection);
printf(" max_protection = %x,", vme->max_protection);
printf(" inheritance = %d,", vme->inheritance);
@@ -811,7 +812,9 @@ findname(kvm_t *kd, struct kbit *vmspace,
D(vmspace, vmspace)->vm_dsize * getpagesize() / 2 <
(vme->end - vme->start)) {
name = " [ heap ]";
- } else
+ } else if (UVM_ET_ISHOLE(vme))
+ name = " [ hole ]";
+ else
name = " [ anon ]";
return (name);