r206 - in trunk/varnish-cache: bin/varnishd include lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Sun Jun 18 12:28:11 CEST 2006


Author: phk
Date: 2006-06-18 12:28:11 +0200 (Sun, 18 Jun 2006)
New Revision: 206

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vcl.c
   trunk/varnish-cache/include/vcl_lang.h
   trunk/varnish-cache/lib/libvcl/vcl_compile.c
   trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c
Log:
Output line+pos for counts.


Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vcl.c	2006-06-18 10:19:54 UTC (rev 205)
+++ trunk/varnish-cache/bin/varnishd/cache_vcl.c	2006-06-18 10:28:11 UTC (rev 206)
@@ -198,10 +198,12 @@
 }
 
 void
-VCL_count(unsigned u)
+VCL_count(struct sess *sp, unsigned u)
 {
 	
-	VSL(SLT_VCL, 0, "%u", u);
+	VSL(SLT_VCL, 0, "%u %d.%d", u,
+	    sp->vcl->ref[u].line,
+	    sp->vcl->ref[u].pos);
 }
 
 /*--------------------------------------------------------------------*/

Modified: trunk/varnish-cache/include/vcl_lang.h
===================================================================
--- trunk/varnish-cache/include/vcl_lang.h	2006-06-18 10:19:54 UTC (rev 205)
+++ trunk/varnish-cache/include/vcl_lang.h	2006-06-18 10:28:11 UTC (rev 206)
@@ -91,7 +91,7 @@
 #define VCL_FARGS	struct sess *sess
 #define VCL_PASS_ARGS	sess
 
-void VCL_count(unsigned);
+void VCL_count(struct sess *, unsigned);
 void VCL_no_cache(VCL_FARGS);
 void VCL_no_new_cache(VCL_FARGS);
 int ip_match(unsigned, struct vcl_acl *);

Modified: trunk/varnish-cache/lib/libvcl/vcl_compile.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_compile.c	2006-06-18 10:19:54 UTC (rev 205)
+++ trunk/varnish-cache/lib/libvcl/vcl_compile.c	2006-06-18 10:28:11 UTC (rev 206)
@@ -272,7 +272,7 @@
 
 #define C(tl, sep)	do {				\
 	I(tl);						\
-	sbuf_printf(tl->fc, "VCL_count(%u)%s\n", ++tl->cnt, sep);	\
+	sbuf_printf(tl->fc, "VCL_count(sess, %u)%s\n", ++tl->cnt, sep);	\
 	tl->t->cnt = tl->cnt; 				\
 } while (0)
 	

Modified: trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c	2006-06-18 10:19:54 UTC (rev 205)
+++ trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c	2006-06-18 10:28:11 UTC (rev 206)
@@ -490,7 +490,7 @@
 	fputs("#define VCL_FARGS	struct sess *sess\n", f);
 	fputs("#define VCL_PASS_ARGS	sess\n", f);
 	fputs("\n", f);
-	fputs("void VCL_count(unsigned);\n", f);
+	fputs("void VCL_count(struct sess *, unsigned);\n", f);
 	fputs("void VCL_no_cache(VCL_FARGS);\n", f);
 	fputs("void VCL_no_new_cache(VCL_FARGS);\n", f);
 	fputs("int ip_match(unsigned, struct vcl_acl *);\n", f);




More information about the varnish-commit mailing list