Commit 720986b3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add new SLT_Link records to link request VXIDs to session VXIDs and

backend VXIDs to request VXIDs.

Still TBD: where ESI fits into this.
parent 9880dcba
......@@ -760,7 +760,7 @@ double BAN_Time(const struct ban *ban);
/* cache_busyobj.c */
void VBO_Init(void);
struct busyobj *VBO_GetBusyObj(struct worker *wrk);
struct busyobj *VBO_GetBusyObj(struct worker *, const struct req *);
void VBO_DerefBusyObj(struct worker *wrk, struct busyobj **busyobj);
void VBO_Free(struct busyobj **vbo);
......
......@@ -87,7 +87,7 @@ VBO_Free(struct busyobj **bop)
}
struct busyobj *
VBO_GetBusyObj(struct worker *wrk)
VBO_GetBusyObj(struct worker *wrk, const struct req *req)
{
struct busyobj *bo = NULL;
uint16_t nhttp;
......@@ -129,6 +129,7 @@ VBO_GetBusyObj(struct worker *wrk)
sz = cache_param->vsl_buffer;
VSL_Setup(bo->vsl, p, sz);
bo->vsl->wid = VXID_Get(&wrk->vxid_pool) | VSL_BACKENDMARKER;
VSLb(bo->vsl, SLT_Link, "req %u", req->vsl->wid & VSL_IDENTMASK);
p += sz;
p = (void*)PRNDUP(p);
assert(p < bo->end);
......
......@@ -267,7 +267,7 @@ cnt_error(struct worker *wrk, struct req *req)
AZ(req->obj);
AZ(req->busyobj);
bo = VBO_GetBusyObj(wrk);
bo = VBO_GetBusyObj(wrk, req);
req->busyobj = bo;
AZ(bo->stats);
bo->stats = &wrk->stats;
......@@ -807,7 +807,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
/* If we inserted a new object it's a miss */
if (oc->flags & OC_F_BUSY) {
AZ(req->busyobj);
bo = VBO_GetBusyObj(wrk);
bo = VBO_GetBusyObj(wrk, req);
req->busyobj = bo;
/* One ref for req, one for FetchBody */
bo->refcount = 2;
......@@ -943,7 +943,7 @@ cnt_pass(struct worker *wrk, struct req *req)
AZ(req->obj);
AZ(req->busyobj);
req->busyobj = VBO_GetBusyObj(wrk);
req->busyobj = VBO_GetBusyObj(wrk, req);
bo = req->busyobj;
bo->refcount = 2;
HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq);
......@@ -1002,7 +1002,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
AZ(req->busyobj);
req->acct_req.pipe++;
req->busyobj = VBO_GetBusyObj(wrk);
req->busyobj = VBO_GetBusyObj(wrk, req);
bo = req->busyobj;
HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq);
http_FilterReq(req, 0);
......@@ -1090,7 +1090,6 @@ cnt_recv(const struct worker *wrk, struct req *req)
AZ(req->obj);
AZ(req->busyobj);
/* Assign XID and log */
VSLb(req->vsl, SLT_ReqStart, "%s %s", req->sp->addr, req->sp->port);
if (req->err_code) {
......
......@@ -386,6 +386,7 @@ SES_GetReq(struct worker *wrk, struct sess *sp)
sz = cache_param->workspace_thread;
VSL_Setup(req->vsl, p, sz);
req->vsl->wid = VXID_Get(&wrk->vxid_pool) | VSL_CLIENTMARKER;
VSLb(req->vsl, SLT_Link, "sess %u", sp->vxid & VSL_IDENTMASK);
p += sz;
p = (void*)PRNDUP(p);
......
......@@ -156,3 +156,11 @@ SLTM(VCL_Log, "Log statement from VCL", "")
SLTM(VCL_Error, "", "")
SLTM(Gzip, "G(un)zip performed on object", "")
SLTM(Link, "Linkage between different VXIDs",
"Links this records VXID to its parent VXID\n"
"The first field gives the type of the parent:\n"
" req Request\n"
" sess Session\n"
"The second field gives the VXID if the parent.\n"
)
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