r2561 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Mar 7 12:43:38 CET 2008


Author: phk
Date: 2008-03-07 12:43:38 +0100 (Fri, 07 Mar 2008)
New Revision: 2561

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_hash.c
   trunk/varnish-cache/bin/varnishd/cache_ws.c
Log:
Log free object workspace instead of used to get the size of the object
structure into the picture.


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2008-03-07 11:36:52 UTC (rev 2560)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2008-03-07 11:43:38 UTC (rev 2561)
@@ -581,7 +581,7 @@
 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);

Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2008-03-07 11:36:52 UTC (rev 2560)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2008-03-07 11:43:38 UTC (rev 2561)
@@ -300,7 +300,7 @@
 		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 @@
 		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);

Modified: trunk/varnish-cache/bin/varnishd/cache_ws.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ws.c	2008-03-07 11:36:52 UTC (rev 2560)
+++ trunk/varnish-cache/bin/varnishd/cache_ws.c	2008-03-07 11:43:38 UTC (rev 2561)
@@ -136,11 +136,11 @@
 }
 
 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 *




More information about the varnish-commit mailing list