]> err.no Git - varnish/commitdiff
Tag objects with their origin session xid and log it when we clean up.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 29 Jun 2006 14:37:15 +0000 (14:37 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 29 Jun 2006 14:37:15 +0000 (14:37 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@266 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_expire.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/include/shmlog_tags.h

index 6ebdbfe7e77a46c7df4c362bf793587e06d4f053..797c3719c3861800a3a5e56c7d664a912e6530f0 100644 (file)
@@ -65,6 +65,7 @@ extern struct stevedore *stevedore;
 
 struct object {        
        unsigned                refcnt;
+       unsigned                xid;
        struct objhead          *objhead;
        pthread_cond_t          cv;
 
index d1f600953f0096ae38f6b1a9e01c59c6d0ef8802..c76b842aa594ec5bd029e591c1c2ddba097b7b07 100644 (file)
@@ -52,6 +52,7 @@ exp_hangman(void *arg)
                }
                TAILQ_REMOVE(&exp_deathrow, o, deathrow);
                AZ(pthread_mutex_unlock(&exp_mtx));
+               VSL(SLT_ExpKill, 0, "%u", o->xid);
                HSH_Deref(o);
        }
 }
@@ -83,6 +84,7 @@ exp_prefetch(void *arg)
                }
                binheap_delete(exp_heap, 0);
                AZ(pthread_mutex_unlock(&exp_mtx));
+               VSL(SLT_ExpPick, 0, "%u", o->xid);
 
                sp.vcl = GetVCL();
                sp.obj = o;
index a363e90641e3af57fac1cdd7236f7b2564410837..45c79371853e9a0c991ff5fd5f7f992c4c23a6c2 100644 (file)
@@ -245,6 +245,8 @@ FetchSession(struct worker *w, struct sess *sp)
        time_t t_req, t_resp;
        int body;
 
+       sp->obj->xid = sp->xid;
+
        fd = VBE_GetFd(sp->backend, &fd_token, sp->xid);
        assert(fd != -1);
        VSL(SLT_Backend, sp->fd, "%d %s", fd, sp->backend->vcl_name);
index bbe13c0c02ef9580cbe2e04dbe6459c628b4e788..884ac024dd5000bfd49d00876bce7fb94cd848a5 100644 (file)
@@ -34,3 +34,5 @@ SLTM(BldHdr)
 SLTM(LostHeader)
 SLTM(VCL)
 SLTM(XID)
+SLTM(ExpPick)
+SLTM(ExpKill)