r4225 - in trunk/varnish-cache: bin/varnishd include
phk at projects.linpro.no
phk at projects.linpro.no
Wed Sep 2 22:09:29 CEST 2009
Author: phk
Date: 2009-09-02 22:09:29 +0200 (Wed, 02 Sep 2009)
New Revision: 4225
Modified:
trunk/varnish-cache/bin/varnishd/cache_hash.c
trunk/varnish-cache/include/stat_field.h
Log:
Add a counter for objhead allocations on the off-chance that they are
what is leaking.
Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c 2009-09-02 18:05:15 UTC (rev 4224)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2009-09-02 20:09:29 UTC (rev 4225)
@@ -158,6 +158,7 @@
ALLOC_OBJ(oc, OBJCORE_MAGIC);
XXXAN(oc);
w->nobjcore = oc;
+ w->stats.n_objectcore++;
oc->flags |= OC_F_BUSY;
}
CHECK_OBJ_NOTNULL(w->nobjcore, OBJCORE_MAGIC);
@@ -664,6 +665,7 @@
Lck_Unlock(&oh->mtx);
assert(oh->refcnt > 0);
FREE_OBJ(oc);
+ sp->wrk->stats.n_objectcore--;
if (hash->deref(oh))
return;
HSH_DeleteObjHead(sp->wrk, oh);
@@ -766,6 +768,7 @@
}
AN(oh);
FREE_OBJ(oc);
+ w->stats.n_objectcore--;
/* Drop our ref on the objhead */
assert(oh->refcnt > 0);
if (hash->deref(oh))
Modified: trunk/varnish-cache/include/stat_field.h
===================================================================
--- trunk/varnish-cache/include/stat_field.h 2009-09-02 18:05:15 UTC (rev 4224)
+++ trunk/varnish-cache/include/stat_field.h 2009-09-02 20:09:29 UTC (rev 4225)
@@ -52,6 +52,7 @@
MAC_STAT(n_sess_mem, uint64_t, 0, 'i', "N struct sess_mem")
MAC_STAT(n_sess, uint64_t, 0, 'i', "N struct sess")
MAC_STAT(n_object, uint64_t, 1, 'i', "N struct object")
+MAC_STAT(n_objectcore, uint64_t, 1, 'i', "N struct objectcore")
MAC_STAT(n_objecthead, uint64_t, 1, 'i', "N struct objecthead")
MAC_STAT(n_smf, uint64_t, 0, 'i', "N struct smf")
MAC_STAT(n_smf_frag, uint64_t, 0, 'i', "N small free smf")
More information about the varnish-commit
mailing list