Adjust debug logging calls to changed VSL interface (64bit xids)

parent acda07ec
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
#define Debug(fmt, ...) printf(fmt, __VA_ARGS__) #define Debug(fmt, ...) printf(fmt, __VA_ARGS__)
#define VSLdbgv(tng, fmt, ...) \ #define VSLdbgv(tng, fmt, ...) \
do { \ do { \
VSL(SLT_Debug, 0, "xid=%u t=%.6f " fmt, \ VSL(SLT_Debug, NO_VXID, "xid=%lu t=%.6f " fmt, \
VXID((tng)->vsl->wid), VTIM_real(), __VA_ARGS__); \ VXID((tng)->vsl->wid), VTIM_real(), __VA_ARGS__); \
VSLb((tng)->vsl, SLT_Debug, fmt, __VA_ARGS__); \ VSLb((tng)->vsl, SLT_Debug, fmt, __VA_ARGS__); \
} while(0) } while(0)
#define VSLdbg(tng, msg) \ #define VSLdbg(tng, msg) \
do { \ do { \
VSL(SLT_Debug, 0, "xid=%u t=%.6f " msg, \ VSL(SLT_Debug, NO_VXID, "xid=%lu t=%.6f " msg, \
VXID((tng)->vsl->wid), VTIM_real()); \ VXID((tng)->vsl->wid), VTIM_real()); \
VSLb((tng)->vsl, SLT_Debug, msg); \ VSLb((tng)->vsl, SLT_Debug, msg); \
} while(0) } while(0)
#define VSL0dbg(...) VSL(SLT_Debug, 0, __VA_ARGS__) #define VSL0dbg(...) VSL(SLT_Debug, NO_VXID, __VA_ARGS__)
#else #else
#define VSLdbgv(tng, fmt, ...) (void)0 #define VSLdbgv(tng, fmt, ...) (void)0
#define VSLdbg(tng, msg) (void)0 #define VSLdbg(tng, msg) (void)0
......
...@@ -735,7 +735,6 @@ push_subreq(struct req *req, struct bytes_tree *tree, ...@@ -735,7 +735,6 @@ push_subreq(struct req *req, struct bytes_tree *tree,
AZ(subreq->objcore->flags & OC_F_FINAL); AZ(subreq->objcore->flags & OC_F_FINAL);
VSLdbg(vdx, "DeliverObj from top");
/* /*
* XXX how should we handle a failed subreq? * XXX how should we handle a failed subreq?
* https://github.com/varnishcache/varnish-cache/issues/3264 * https://github.com/varnishcache/varnish-cache/issues/3264
...@@ -998,7 +997,7 @@ worklist_unpend(const struct vdp_ctx *vdx, struct bytes_tree *tree, ...@@ -998,7 +997,7 @@ worklist_unpend(const struct vdp_ctx *vdx, struct bytes_tree *tree,
assert(VSTAILQ_EMPTY(work)); assert(VSTAILQ_EMPTY(work));
Lck_AssertHeld(&tree->tree_lock); Lck_AssertHeld(&tree->tree_lock);
VSLdbgv(vdx->vsl, "bytes_unpend: retval=%d front=%p root=%p", VSLdbgv(vdx, "bytes_unpend: retval=%d front=%p root=%p",
tree->retval, tree->front, tree->root); tree->retval, tree->front, tree->root);
if (tree->retval) if (tree->retval)
return; return;
......
...@@ -342,7 +342,7 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -342,7 +342,7 @@ vped_include(struct req *preq, const char *src, const char *host,
VSLdbgv(preq, "vped_include: new req=%p", req); VSLdbgv(preq, "vped_include: new req=%p", req);
assert(VXID(req->vsl->wid) == VXID(NO_VXID)); assert(VXID(req->vsl->wid) == VXID(NO_VXID));
req->vsl->wid = VXID_Get(wrk, VSL_CLIENTMARKER); req->vsl->wid = VXID_Get(wrk, VSL_CLIENTMARKER);
VSLdbgv(preq, "vped_include: new xid=%d", VXID(req->vsl->wid)); VSLdbgv(preq, "vped_include: new xid=%ju", VXID(req->vsl->wid));
VSLb(req->vsl, SLT_Begin, "req %ju esi", VXID(preq->vsl->wid)); VSLb(req->vsl, SLT_Begin, "req %ju esi", VXID(preq->vsl->wid));
VSLb(preq->vsl, SLT_Link, "req %ju esi", VXID(req->vsl->wid)); VSLb(preq->vsl, SLT_Link, "req %ju esi", VXID(req->vsl->wid));
...@@ -1082,7 +1082,8 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv, ...@@ -1082,7 +1082,8 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
node_insert(tree, node, child); node_insert(tree, node, child);
pesi->pecx->abrt = abrt; pesi->pecx->abrt = abrt;
VSLdbg(vdx, "vped_vdp: call vped_include"); VSLdbgv(vdx, "vped_vdp: call vped_include "
"abrt=%d", abrt);
parallel = parallel =
vped_include(req, (const char*)q, vped_include(req, (const char*)q,
(const char*)pecx->p, (const char*)pecx->p,
...@@ -1332,6 +1333,9 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -1332,6 +1333,9 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
node = pesi->node; node = pesi->node;
parent = node->parent; parent = node->parent;
CHECK_OBJ_NOTNULL(parent, NODE_MAGIC); CHECK_OBJ_NOTNULL(parent, NODE_MAGIC);
VSLdbgv(req, "vped_deliver: req=%p boc=%p wantbody=%d abrt=%d",
req, boc, wantbody, pesi->pecx->abrt);
assert(parent->type == T_NEXUS); assert(parent->type == T_NEXUS);
if (wantbody == 0) { if (wantbody == 0) {
......
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