Commit f6864104 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Log free object workspace instead of used to get the size of the object

structure into the picture.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2561 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ee46a84a
...@@ -581,7 +581,7 @@ void WS_Reset(struct ws *ws, char *p); ...@@ -581,7 +581,7 @@ void WS_Reset(struct ws *ws, char *p);
char *WS_Alloc(struct ws *ws, unsigned bytes); char *WS_Alloc(struct ws *ws, unsigned bytes);
char *WS_Dup(struct ws *ws, const char *); char *WS_Dup(struct ws *ws, const char *);
char *WS_Snapshot(struct ws *ws); char *WS_Snapshot(struct ws *ws);
unsigned WS_Used(struct ws *ws); unsigned WS_Free(struct ws *ws);
/* rfc2616.c */ /* rfc2616.c */
int RFC2616_cache_policy(const struct sess *sp, const struct http *hp); int RFC2616_cache_policy(const struct sess *sp, const struct http *hp);
......
...@@ -300,7 +300,7 @@ HSH_Unbusy(struct sess *sp) ...@@ -300,7 +300,7 @@ HSH_Unbusy(struct sess *sp)
VSL_stats->n_objoverflow++; VSL_stats->n_objoverflow++;
if (params->diag_bitmap & 0x40) if (params->diag_bitmap & 0x40)
WSP(sp, SLT_Debug, 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; oh = o->objhead;
if (oh != NULL) { if (oh != NULL) {
...@@ -366,8 +366,8 @@ HSH_Deref(struct object *o) ...@@ -366,8 +366,8 @@ HSH_Deref(struct object *o)
return; return;
if (params->diag_bitmap & 0x40) if (params->diag_bitmap & 0x40)
VSL(SLT_Debug, 0, VSL(SLT_Debug, 0, "Object %u workspace min free %u",
"Object workspace max used %u", WS_Used(o->ws_o)); o->xid, WS_Free(o->ws_o));
if (o->vary != NULL) if (o->vary != NULL)
free(o->vary); free(o->vary);
......
...@@ -136,11 +136,11 @@ WS_Dup(struct ws *ws, const char *s) ...@@ -136,11 +136,11 @@ WS_Dup(struct ws *ws, const char *s)
} }
unsigned unsigned
WS_Used(struct ws *ws) WS_Free(struct ws *ws)
{ {
WS_Assert(ws); WS_Assert(ws);
return(ws->f - ws->s); return(ws->e - ws->f);
} }
char * char *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment