[master] 6e3d77e prep field names for sess_close stats counters

Nils Goroll nils.goroll at uplex.de
Mon Mar 16 16:12:12 CET 2015


commit 6e3d77ed54900ccb98d42fabb646c4a3e993484b
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Mar 16 15:18:02 2015 +0100

    prep field names for sess_close stats counters

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 8817c3c..6c46bea 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -86,7 +86,7 @@ enum req_body_state_e {
 
 enum sess_close {
 	SC_NULL = 0,
-#define SESS_CLOSE(nm, desc)	SC_##nm,
+#define SESS_CLOSE(nm, stat, desc)	SC_##nm,
 #include "tbl/sess_close.h"
 #undef SESS_CLOSE
 };
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 865a45a..f0c459d 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -101,7 +101,7 @@ sess_close_2str(enum sess_close sc, int want_desc)
 {
 	switch (sc) {
 	case SC_NULL:		return(want_desc ? "(null)": "NULL");
-#define SESS_CLOSE(nm, desc)	case SC_##nm: return(want_desc ? desc : #nm);
+#define SESS_CLOSE(nm, s, desc) case SC_##nm: return(want_desc ? desc : #nm);
 #include "tbl/sess_close.h"
 #undef SESS_CLOSE
 
diff --git a/include/tbl/sess_close.h b/include/tbl/sess_close.h
index 99b9f38..f6e928d 100644
--- a/include/tbl/sess_close.h
+++ b/include/tbl/sess_close.h
@@ -29,19 +29,20 @@
 
 /*lint -save -e525 -e539 */
 
-SESS_CLOSE(REM_CLOSE,		"Client Closed")
-SESS_CLOSE(REQ_CLOSE,		"Client requested close")
-SESS_CLOSE(REQ_HTTP10,		"Proto < HTTP/1.1")
-SESS_CLOSE(RX_BAD,		"Received bad req/resp")
-SESS_CLOSE(RX_BODY,		"Failure receiving req.body")
-SESS_CLOSE(RX_JUNK,		"Received junk data")
-SESS_CLOSE(RX_OVERFLOW,		"Received buffer overflow")
-SESS_CLOSE(RX_TIMEOUT,		"Receive timeout")
-SESS_CLOSE(TX_PIPE,		"Piped transaction")
-SESS_CLOSE(TX_ERROR,		"Error transaction")
-SESS_CLOSE(TX_EOF,		"EOF transmission")
-SESS_CLOSE(RESP_CLOSE,		"Backend/VCL requested close")
-SESS_CLOSE(OVERLOAD,		"Out of some resource")
-SESS_CLOSE(PIPE_OVERFLOW,	"Session pipe overflow")
+// enum sess_close		SC.* stat	Verbose error
+SESS_CLOSE(REM_CLOSE,		rem_close,	"Client Closed")
+SESS_CLOSE(REQ_CLOSE,		req_close,	"Client requested close")
+SESS_CLOSE(REQ_HTTP10,		req_http10,	"Proto < HTTP/1.1")
+SESS_CLOSE(RX_BAD,		rx_bad,	"Received bad req/resp")
+SESS_CLOSE(RX_BODY,		rx_body,	"Failure receiving req.body")
+SESS_CLOSE(RX_JUNK,		rx_junk,	"Received junk data")
+SESS_CLOSE(RX_OVERFLOW, 	rx_overflow,	"Received buffer overflow")
+SESS_CLOSE(RX_TIMEOUT,		rx_timeout,	"Receive timeout")
+SESS_CLOSE(TX_PIPE,		tx_pipe,	"Piped transaction")
+SESS_CLOSE(TX_ERROR,		tx_error,	"Error transaction")
+SESS_CLOSE(TX_EOF,		tx_eof,	"EOF transmission")
+SESS_CLOSE(RESP_CLOSE,		resp_close,	"Backend/VCL requested close")
+SESS_CLOSE(OVERLOAD,		overload,	"Out of some resource")
+SESS_CLOSE(PIPE_OVERFLOW,	pipe_overflow,	"Session pipe overflow")
 
 /*lint -restore */
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 8002f95..0f9a56b 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -81,7 +81,7 @@ SLTM(SessOpen, 0, "Client connection opened",
  * XXX: in the middle of a macro invocation :-(
  * XXX: If we could, these three lines would have described the
  * XXX: 'reason' field below.
-#define SESS_CLOSE(nm, desc) "    " #nm "\n\t" desc "\n\n"
+#define SESS_CLOSE(nm, s, desc) "    " #nm "\n\t" desc "\n\n"
 #include "tbl/sess_close.h"
 #undef SESS_CLOSE
 */



More information about the varnish-commit mailing list