[master] 34f4b96 Remove struct sess acct_bit and bit fields from SessClose log record
Martin Blix Grydeland
martin at varnish-software.com
Mon Mar 31 11:28:00 CEST 2014
commit 34f4b96a53356f49e782d7a31957704f2129d7b2
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Fri Mar 28 11:04:12 2014 +0100
Remove struct sess acct_bit and bit fields from SessClose log record
We want to remove the req->acct_req dup counters that was feeding this
data to reduce the size of struct req. The statistics value of the
boolean flags was also small. So it's going away.
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index ea5d990..b793467 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -234,12 +234,6 @@ struct acct {
#undef ACCT
};
-struct acct_bit {
-#define ACCT(foo) unsigned int foo : 1;
-#include "tbl/acct_fields.h"
-#undef ACCT
-};
-
/*--------------------------------------------------------------------*/
#define L0(t, n)
@@ -748,8 +742,6 @@ struct sess {
enum sess_close reason;
uint32_t vxid;
- struct acct_bit acct_bit;
-
/* Cross references ------------------------------------------*/
struct sesspool *sesspool;
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index 73ed5c7..8059c83 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -81,7 +81,6 @@ SES_Charge(struct worker *wrk, struct req *req)
#define ACCT(foo) \
wrk->stats.s_##foo += a->foo; \
- if (a->foo) sp->acct_bit.foo =1; \
a->foo = 0;
#include "tbl/acct_fields.h"
#undef ACCT
@@ -316,7 +315,6 @@ SES_Close(struct sess *sp, enum sess_close reason)
void
SES_Delete(struct sess *sp, enum sess_close reason, double now)
{
- struct acct_bit *b;
struct sesspool *pp;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
@@ -332,10 +330,8 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
now = VTIM_real();
assert(!isnan(sp->t_open));
- b = &sp->acct_bit;
- VSL(SLT_SessClose, sp->vxid, "%s %.3f %u %u %u %u %u %u",
- sess_close_2str(sp->reason, 0), now - sp->t_open, b->req,
- b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes);
+ VSL(SLT_SessClose, sp->vxid, "%s %.3f",
+ sess_close_2str(sp->reason, 0), now - sp->t_open);
VSL(SLT_End, sp->vxid, "%s", "");
Lck_Delete(&sp->mtx);
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 0f50a48..10a3a15 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -102,16 +102,10 @@ SLTM(SessOpen, 0, "Client connection opened",
SLTM(SessClose, 0, "Client connection closed",
"SessionClose is the last record for any client connection.\n\n"
"The format is::\n\n"
- "\t%s %f %u %u %u %u %u %u\n"
- "\t| | | | | | | |\n"
- "\t| | | | | | | +- Bool: Body bytes were sent\n"
- "\t| | | | | | +---- Bool: Resp.Header bytes sent\n"
- "\t| | | | | +------- Bool: Backend fetches initiated\n"
- "\t| | | | +---------- Bool: 'pass' used\n"
- "\t| | | +------------- Bool: 'pipe' used\n"
- "\t| | +---------------- Bool: good requests completed\n"
- "\t| +------------------- How long the session was open\n"
- "\t+---------------------- Why the connection closed\n"
+ "\t%s %f\n"
+ "\t| |\n"
+ "\t| +- How long the session was open\n"
+ "\t+---- Why the connection closed\n"
"\n"
)
More information about the varnish-commit
mailing list