Properly count object lookups and hits.
This commit is contained in:
parent
4da5299d11
commit
a08a17a3ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3610
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user