[master] 4e3169c Dump some info on fetch_objcore during panics

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 17 17:06:30 CET 2014


commit 4e3169c626d0591189c4de67f9b08e6a7f9aa44e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 17 16:05:42 2014 +0000

    Dump some info on fetch_objcore during panics

diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 8df8bfa..a01e771 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -228,6 +228,19 @@ pan_object(const char *typ, const struct object *o)
 /*--------------------------------------------------------------------*/
 
 static void
+pan_objcore(const char *typ, const struct objcore *oc)
+{
+
+	VSB_printf(pan_vsp, "  objcore (%s) = %p {\n", typ, oc);
+	VSB_printf(pan_vsp, "    refcnt = %d\n", oc->refcnt);
+	VSB_printf(pan_vsp, "    flags = 0x%x\n", oc->flags);
+	VSB_printf(pan_vsp, "    objhead = %p\n", oc->objhead);
+	VSB_printf(pan_vsp, "  }\n");
+}
+
+/*--------------------------------------------------------------------*/
+
+static void
 pan_vcl(const struct VCL_conf *vcl)
 {
 	int i;
@@ -284,6 +297,8 @@ pan_busyobj(const struct busyobj *bo)
 	if (bo->beresp->ws != NULL)
 		pan_http("beresp", bo->beresp, 4);
 	pan_ws(bo->ws_o, 4);
+	if (bo->fetch_objcore)
+		pan_objcore("FETCH", bo->fetch_objcore);
 	if (bo->fetch_obj)
 		pan_object("FETCH", bo->fetch_obj);
 	if (bo->ims_obj)



More information about the varnish-commit mailing list