Commit 495b9f51 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move 3 more debug bits from diag_bitmaps to debug

XXX: doc-update needed
parent 609c67d1
...@@ -836,13 +836,13 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass) ...@@ -836,13 +836,13 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
b->flags &= ~BAN_F_LURK; b->flags &= ~BAN_F_LURK;
b->flags |= pass; b->flags |= pass;
} }
if (cache_param->diag_bitmap & 0x80000) if (DO_DEBUG(DBG_LURKER))
VSLb(vsl, SLT_Debug, "lurker: %d actionable bans", i); VSLb(vsl, SLT_Debug, "lurker: %d actionable bans", i);
if (i == 0) if (i == 0)
return (0); return (0);
VTAILQ_FOREACH_REVERSE(b, &ban_head, banhead_s, list) { VTAILQ_FOREACH_REVERSE(b, &ban_head, banhead_s, list) {
if (cache_param->diag_bitmap & 0x80000) if (DO_DEBUG(DBG_LURKER))
VSLb(vsl, SLT_Debug, "lurker doing %f %d", VSLb(vsl, SLT_Debug, "lurker doing %f %d",
ban_time(b->spec), b->refcount); ban_time(b->spec), b->refcount);
while (1) { while (1) {
...@@ -851,7 +851,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass) ...@@ -851,7 +851,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
if (oc == NULL) if (oc == NULL)
break; break;
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
if (cache_param->diag_bitmap & 0x80000) if (DO_DEBUG(DBG_LURKER))
VSLb(vsl, SLT_Debug, "test: %p %u %u", VSLb(vsl, SLT_Debug, "test: %p %u %u",
oc, oc->flags & OC_F_LURK, pass); oc, oc->flags & OC_F_LURK, pass);
if ((oc->flags & OC_F_LURK) == pass) if ((oc->flags & OC_F_LURK) == pass)
...@@ -903,7 +903,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass) ...@@ -903,7 +903,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
*/ */
o = oc_getobj(&wrk->stats, oc); o = oc_getobj(&wrk->stats, oc);
i = ban_check_object(o, vsl, NULL); i = ban_check_object(o, vsl, NULL);
if (cache_param->diag_bitmap & 0x80000) if (DO_DEBUG(DBG_LURKER))
VSLb(vsl, SLT_Debug, "lurker got: %p %d", VSLb(vsl, SLT_Debug, "lurker got: %p %d",
oc, i); oc, i);
if (i == -1) { if (i == -1) {
...@@ -915,7 +915,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass) ...@@ -915,7 +915,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
Lck_Unlock(&ban_mtx); Lck_Unlock(&ban_mtx);
} }
Lck_Unlock(&oh->mtx); Lck_Unlock(&oh->mtx);
if (cache_param->diag_bitmap & 0x80000) if (DO_DEBUG(DBG_LURKER))
VSLb(vsl, SLT_Debug, "lurker done: %p %u %u", VSLb(vsl, SLT_Debug, "lurker done: %p %u %u",
oc, oc->flags & OC_F_LURK, pass); oc, oc->flags & OC_F_LURK, pass);
(void)HSH_Deref(&wrk->stats, NULL, &o); (void)HSH_Deref(&wrk->stats, NULL, &o);
...@@ -927,7 +927,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass) ...@@ -927,7 +927,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
b->flags |= BAN_F_GONE; b->flags |= BAN_F_GONE;
VSC_C_main->bans_gone++; VSC_C_main->bans_gone++;
} }
if (cache_param->diag_bitmap & 0x80000) if (DO_DEBUG(DBG_LURKER))
VSLb(vsl, SLT_Debug, "lurker BAN %f now gone", VSLb(vsl, SLT_Debug, "lurker BAN %f now gone",
ban_time(b->spec)); ban_time(b->spec));
} }
...@@ -1091,7 +1091,7 @@ ccf_ban_list(struct cli *cli, const char * const *av, void *priv) ...@@ -1091,7 +1091,7 @@ ccf_ban_list(struct cli *cli, const char * const *av, void *priv)
VCLI_Out(cli, "Present bans:\n"); VCLI_Out(cli, "Present bans:\n");
VTAILQ_FOREACH(b, &ban_head, list) { VTAILQ_FOREACH(b, &ban_head, list) {
if (b == bl && !(cache_param->diag_bitmap & 0x80000)) if (b == bl && !DO_DEBUG(DBG_LURKER))
break; break;
VCLI_Out(cli, "%10.6f %5u%s\t", ban_time(b->spec), VCLI_Out(cli, "%10.6f %5u%s\t", ban_time(b->spec),
bl == b ? b->refcount - 1 : b->refcount, bl == b ? b->refcount - 1 : b->refcount,
...@@ -1100,7 +1100,7 @@ ccf_ban_list(struct cli *cli, const char * const *av, void *priv) ...@@ -1100,7 +1100,7 @@ ccf_ban_list(struct cli *cli, const char * const *av, void *priv)
VCLI_Out(cli, "\n"); VCLI_Out(cli, "\n");
if (VCLI_Overflow(cli)) if (VCLI_Overflow(cli))
break; break;
if (cache_param->diag_bitmap & 0x80000) { if (DO_DEBUG(DBG_LURKER)) {
Lck_Lock(&ban_mtx); Lck_Lock(&ban_mtx);
struct objcore *oc; struct objcore *oc;
VTAILQ_FOREACH(oc, &b->objcore, ban_list) VTAILQ_FOREACH(oc, &b->objcore, ban_list)
......
...@@ -305,7 +305,7 @@ HSH_Lookup(struct req *req) ...@@ -305,7 +305,7 @@ HSH_Lookup(struct req *req)
AN(hash); AN(hash);
hsh_prealloc(wrk); hsh_prealloc(wrk);
if (cache_param->diag_bitmap & 0x80000000) if (DO_DEBUG(DBG_HASHEDGE))
hsh_testmagic(req->digest); hsh_testmagic(req->digest);
if (req->hash_objhead != NULL) { if (req->hash_objhead != NULL) {
......
...@@ -140,10 +140,8 @@ ses_req_pool_task(struct worker *wrk, void *arg) ...@@ -140,10 +140,8 @@ ses_req_pool_task(struct worker *wrk, void *arg)
HTTP1_Session(wrk, req); HTTP1_Session(wrk, req);
WS_Assert(wrk->aws); WS_Assert(wrk->aws);
AZ(wrk->wrw); AZ(wrk->wrw);
if (cache_param->diag_bitmap & 0x00040000) { if (DO_DEBUG(DBG_VCLREL) && wrk->vcl != NULL)
if (wrk->vcl != NULL)
VCL_Rel(&wrk->vcl); VCL_Rel(&wrk->vcl);
}
THR_SetRequest(NULL); THR_SetRequest(NULL);
} }
......
...@@ -1054,9 +1054,6 @@ static const struct parspec input_parspec[] = { ...@@ -1054,9 +1054,6 @@ static const struct parspec input_parspec[] = {
" 0x00002000 - only short panic message.\n" " 0x00002000 - only short panic message.\n"
" 0x00004000 - panic to stderr.\n" " 0x00004000 - panic to stderr.\n"
" 0x00020000 - synchronous start of persistence.\n" " 0x00020000 - synchronous start of persistence.\n"
" 0x00040000 - release VCL early.\n"
" 0x00080000 - ban-lurker debugging.\n"
" 0x80000000 - do edge-detection on digest.\n"
"\n" "\n"
"Use 0x notation and do the bitor in your head :-)\n" "Use 0x notation and do the bitor in your head :-)\n"
"\n" "\n"
......
...@@ -31,7 +31,7 @@ server s1 { ...@@ -31,7 +31,7 @@ server s1 {
} -start } -start
varnish v1 -arg "-hcritbit" -vcl+backend { } -start varnish v1 -arg "-hcritbit" -vcl+backend { } -start
varnish v1 -cliok "param.set diag_bitmap 0x80000000" varnish v1 -cliok "param.set debug +hashedge"
client c1 { client c1 {
txreq -url "/1" txreq -url "/1"
......
...@@ -36,7 +36,7 @@ varnish v1 -vcl+backend { ...@@ -36,7 +36,7 @@ varnish v1 -vcl+backend {
} -start } -start
varnish v1 -cliok "param.set ban_lurker_sleep 0" varnish v1 -cliok "param.set ban_lurker_sleep 0"
varnish v1 -cliok "param.set diag_bitmap 0x80000" varnish v1 -cliok "param.set debug +lurker"
varnish v1 -cliok "ban.list" varnish v1 -cliok "ban.list"
......
...@@ -15,7 +15,7 @@ varnish v1 -arg "-pthread_pools=1" -vcl+backend { ...@@ -15,7 +15,7 @@ varnish v1 -arg "-pthread_pools=1" -vcl+backend {
} }
} -start } -start
varnish v1 -cliok "param.set diag_bitmap 0x40000" varnish v1 -cliok "param.set debug +vclrel"
client c1 { client c1 {
txreq -url "/bar" txreq -url "/bar"
......
...@@ -8,7 +8,6 @@ server s1 { ...@@ -8,7 +8,6 @@ server s1 {
} -start } -start
varnish v1 \ varnish v1 \
-arg "-pdiag_bitmap=0x30000" \
-storage "-spersistent,${tmpdir}/_.per,10m" \ -storage "-spersistent,${tmpdir}/_.per,10m" \
-arg "-pban_lurker_sleep=0" \ -arg "-pban_lurker_sleep=0" \
-vcl+backend { -vcl+backend {
...@@ -17,6 +16,9 @@ varnish v1 \ ...@@ -17,6 +16,9 @@ varnish v1 \
} }
} -start } -start
varnish v1 -cliok "param.set debug +syncvsl"
varnish v1 -cliok "param.set diag_bitmap 0x20000"
client c1 { client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
......
...@@ -34,3 +34,6 @@ DEBUG_BIT(WORKSPACE, workspace, "", "VSL Workspace operations") ...@@ -34,3 +34,6 @@ DEBUG_BIT(WORKSPACE, workspace, "", "VSL Workspace operations")
DEBUG_BIT(WAITER, waiter, "\t","VSL Waiter internals") DEBUG_BIT(WAITER, waiter, "\t","VSL Waiter internals")
DEBUG_BIT(WAITINGLIST, waitinglist, "", "VSL Waitinglist events") DEBUG_BIT(WAITINGLIST, waitinglist, "", "VSL Waitinglist events")
DEBUG_BIT(SYNCVSL, syncvsl, "\t","Make VSL synchronous") DEBUG_BIT(SYNCVSL, syncvsl, "\t","Make VSL synchronous")
DEBUG_BIT(HASHEDGE, hashedge, "", "Edge cases in Hash")
DEBUG_BIT(VCLREL, vclrel, "\t","Rapid VCL release")
DEBUG_BIT(LURKER, lurker, "\t","VSL Ban lurker")
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