From: phk Date: Fri, 7 Mar 2008 11:43:38 +0000 (+0000) Subject: Log free object workspace instead of used to get the size of the object X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f396aa140e71de90d5e441ccc8ccc589bd91fe7;p=varnish Log free object workspace instead of used to get the size of the object structure into the picture. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2561 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 732444ed..0bcaca8d 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -581,7 +581,7 @@ void WS_Reset(struct ws *ws, char *p); char *WS_Alloc(struct ws *ws, unsigned bytes); char *WS_Dup(struct ws *ws, const char *); char *WS_Snapshot(struct ws *ws); -unsigned WS_Used(struct ws *ws); +unsigned WS_Free(struct ws *ws); /* rfc2616.c */ int RFC2616_cache_policy(const struct sess *sp, const struct http *hp); diff --git a/varnish-cache/bin/varnishd/cache_hash.c b/varnish-cache/bin/varnishd/cache_hash.c index 59022c02..d7a597b9 100644 --- a/varnish-cache/bin/varnishd/cache_hash.c +++ b/varnish-cache/bin/varnishd/cache_hash.c @@ -300,7 +300,7 @@ HSH_Unbusy(struct sess *sp) VSL_stats->n_objoverflow++; if (params->diag_bitmap & 0x40) WSP(sp, SLT_Debug, - "Object workspace used %u", WS_Used(o->ws_o)); + "Object %u workspace free %u", o->xid, WS_Free(o->ws_o)); oh = o->objhead; if (oh != NULL) { @@ -366,8 +366,8 @@ HSH_Deref(struct object *o) return; if (params->diag_bitmap & 0x40) - VSL(SLT_Debug, 0, - "Object workspace max used %u", WS_Used(o->ws_o)); + VSL(SLT_Debug, 0, "Object %u workspace min free %u", + o->xid, WS_Free(o->ws_o)); if (o->vary != NULL) free(o->vary); diff --git a/varnish-cache/bin/varnishd/cache_ws.c b/varnish-cache/bin/varnishd/cache_ws.c index a5b0d793..37991666 100644 --- a/varnish-cache/bin/varnishd/cache_ws.c +++ b/varnish-cache/bin/varnishd/cache_ws.c @@ -136,11 +136,11 @@ WS_Dup(struct ws *ws, const char *s) } unsigned -WS_Used(struct ws *ws) +WS_Free(struct ws *ws) { WS_Assert(ws); - return(ws->f - ws->s); + return(ws->e - ws->f); } char *