summaryrefslogtreecommitdiffstats
path: root/usr.sbin/procmap
diff options
context:
space:
mode:
authorstefan <stefan@openbsd.org>2016-04-16 18:39:30 +0000
committerstefan <stefan@openbsd.org>2016-04-16 18:39:30 +0000
commitd87a780302c39054fb9e9ea16c9438dda074d244 (patch)
treefd4b1e79a01e2969e169564766c71de201ea1aff /usr.sbin/procmap
parentChange last non-/gnu/ fcntl(x, F_GETFL, 0) strays to fcntl(x, F_GETFL). (diff)
downloadwireguard-openbsd-d87a780302c39054fb9e9ea16c9438dda074d244.tar.xz
wireguard-openbsd-d87a780302c39054fb9e9ea16c9438dda074d244.zip
Remove am_maxslot from amap.
am_maxslot represents the total number of slots an amap can be extended to. Since we do not extend amaps, this field as well as rounding the number of slots to the next malloc bucket is not useful. This also removes the corresponding output from procmap(1). ok kettenis@
Diffstat (limited to 'usr.sbin/procmap')
-rw-r--r--usr.sbin/procmap/procmap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c
index f284ded97dc..9ece0df367f 100644
--- a/usr.sbin/procmap/procmap.c
+++ b/usr.sbin/procmap/procmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procmap.c,v 1.59 2015/01/19 19:25:28 kettenis Exp $ */
+/* $OpenBSD: procmap.c,v 1.60 2016/04/16 18:39:30 stefan Exp $ */
/* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */
/*
@@ -97,7 +97,6 @@ rlim_t maxssiz;
struct sum {
unsigned long s_am_nslots;
- unsigned long s_am_maxslots;
unsigned long s_am_nusedslots;
};
@@ -347,12 +346,10 @@ void
print_sum(struct sum *sum, struct sum *total_sum)
{
const char *t = total_sum == NULL ? "total " : "";
- printf("%samap allocated slots: %lu\n", t, sum->s_am_maxslots);
printf("%samap mapped slots: %lu\n", t, sum->s_am_nslots);
printf("%samap used slots: %lu\n", t, sum->s_am_nusedslots);
if (total_sum) {
- total_sum->s_am_maxslots += sum->s_am_maxslots;
total_sum->s_am_nslots += sum->s_am_nslots;
total_sum->s_am_nusedslots += sum->s_am_nusedslots;
}
@@ -785,15 +782,13 @@ dump_vm_map_entry(kvm_t *kd, struct kbit *vmspace,
}
if (print_amap && vme->aref.ar_amap) {
- printf(" amap - ref: %d fl: 0x%x maxsl: %d nsl: %d nuse: %d\n",
+ printf(" amap - ref: %d fl: 0x%x nsl: %d nuse: %d\n",
D(amap, vm_amap)->am_ref,
D(amap, vm_amap)->am_flags,
- D(amap, vm_amap)->am_maxslot,
D(amap, vm_amap)->am_nslot,
D(amap, vm_amap)->am_nused);
if (sum) {
sum->s_am_nslots += D(amap, vm_amap)->am_nslot;
- sum->s_am_maxslots += D(amap, vm_amap)->am_maxslot;
sum->s_am_nusedslots += D(amap, vm_amap)->am_nused;
}
}