Convert hit and miss counters to unsigned values. Surely negative values
for either does not make sense. PR: (one small part of) 19720
This commit is contained in:
parent
5f8aa32e1b
commit
3316a80bd1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98105
@ -47,12 +47,12 @@ static MALLOC_DEFINE(M_KOBJ, "kobj", "Kernel object structures");
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
int kobj_lookup_hits;
|
||||
int kobj_lookup_misses;
|
||||
u_int kobj_lookup_hits;
|
||||
u_int kobj_lookup_misses;
|
||||
|
||||
SYSCTL_INT(_kern, OID_AUTO, kobj_hits, CTLFLAG_RD,
|
||||
SYSCTL_UINT(_kern, OID_AUTO, kobj_hits, CTLFLAG_RD,
|
||||
&kobj_lookup_hits, 0, "")
|
||||
SYSCTL_INT(_kern, OID_AUTO, kobj_misses, CTLFLAG_RD,
|
||||
SYSCTL_UINT(_kern, OID_AUTO, kobj_misses, CTLFLAG_RD,
|
||||
&kobj_lookup_misses, 0, "")
|
||||
|
||||
#endif
|
||||
|
@ -136,8 +136,8 @@ void kobj_delete(kobj_t obj, struct malloc_type *mtype);
|
||||
* Maintain stats on hits/misses in lookup caches.
|
||||
*/
|
||||
#ifdef KOBJ_STATS
|
||||
extern int kobj_lookup_hits;
|
||||
extern int kobj_lookup_misses;
|
||||
extern u_int kobj_lookup_hits;
|
||||
extern u_int kobj_lookup_misses;
|
||||
#define KOBJOPHIT do { kobj_lookup_hits++; } while (0)
|
||||
#define KOBJOPMISS do { kobj_lookup_misses++; } while (0)
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user