Better logging in vtrpc, publish cache statistics.

This commit is contained in:
rsc 2005-11-02 19:08:43 +00:00
parent f51bf04878
commit 7252036fe8
4 changed files with 23 additions and 7 deletions

View file

@ -29,10 +29,9 @@ struct Rwait
static int gettag(VtConn*, Rwait*);
static void puttag(VtConn*, Rwait*, int);
static void muxrpc(VtConn*, Packet*);
Packet *vtrpc(VtConn*, Packet*);
Packet*
vtrpc(VtConn *z, Packet *p)
_vtrpc(VtConn *z, Packet *p, VtFcall *tx)
{
int i;
uchar tag, buf[2], *top;
@ -44,6 +43,12 @@ vtrpc(VtConn *z, Packet *p)
qlock(&z->lk);
r->r.l = &z->lk;
tag = gettag(z, r);
if(tx){
/* vtfcallrpc can't print packet because it doesn't have tag */
tx->tag = tag;
if(chattyventi)
fprint(2, "%s -> %F\n", argv0, tx);
}
/* slam tag into packet */
top = packetpeek(p, buf, 0, 2);
@ -104,6 +109,12 @@ vtrpc(VtConn *z, Packet *p)
return p;
}
Packet*
vtrpc(VtConn *z, Packet *p)
{
return _vtrpc(z, p, nil);
}
static int
gettag(VtConn *z, Rwait *r)
{