summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-10-15 10:28:47 +0000
committerdg <dg@FreeBSD.org>1994-10-15 10:28:47 +0000
commit3cb54af0bcedfc0f5895aa15f93b80b0d093681a (patch)
tree3bdb79809aec3515f8e2b9151fff4b1be62c1a17
parentd1749692ef4f3bde48bfcfefc818784f278cc25c (diff)
downloadFreeBSD-src-3cb54af0bcedfc0f5895aa15f93b80b0d093681a.zip
FreeBSD-src-3cb54af0bcedfc0f5895aa15f93b80b0d093681a.tar.gz
Properly count object lookups and hits.
-rw-r--r--sys/vm/vm_object.c4
-rw-r--r--sys/vm/vm_user.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 67a824f..b9a186e 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.7 1994/10/05 09:48:43 davidg Exp $
+ * $Id: vm_object.c,v 1.8 1994/10/09 01:52:12 phk Exp $
*/
/*
@@ -1030,6 +1030,7 @@ vm_object_t vm_object_lookup(pager)
register vm_object_hash_entry_t entry;
vm_object_t object;
+ cnt.v_lookups++;
vm_object_cache_lock();
for (entry = vm_object_hashtable[vm_object_hash(pager)].tqh_first;
@@ -1046,6 +1047,7 @@ vm_object_t vm_object_lookup(pager)
object->ref_count++;
vm_object_unlock(object);
vm_object_cache_unlock();
+ cnt.v_hits++;
return(object);
}
}
diff --git a/sys/vm/vm_user.c b/sys/vm/vm_user.c
index 0d9087b..d8c8e13 100644
--- a/sys/vm/vm_user.c
+++ b/sys/vm/vm_user.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id$
+ * $Id: vm_user.c,v 1.3 1994/08/02 07:55:42 davidg Exp $
*/
/*
@@ -286,7 +286,6 @@ vm_allocate_with_pager(map, addr, size, anywhere, pager, poffset, internal)
* it.
*/
object = vm_object_lookup(pager);
- cnt.v_lookups++;
if (object == NULL) {
object = vm_object_allocate(size);
/*
@@ -297,8 +296,7 @@ vm_allocate_with_pager(map, addr, size, anywhere, pager, poffset, internal)
*/
if (!internal)
vm_object_enter(object, pager);
- } else
- cnt.v_hits++;
+ }
if (internal)
object->flags |= OBJ_INTERNAL;
else {
OpenPOWER on IntegriCloud