Commit 4789ae33 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

More wanton renaming



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4932 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a755bb01
......@@ -194,11 +194,11 @@ struct acct {
#define L0(n)
#define L1(n) int n;
#define MAC_STAT(n, t, l, f, e) L##l(n)
#define VSC_F_MAIN(n, t, l, f, e) L##l(n)
struct dstat {
#include "vsc_fields.h"
};
#undef MAC_STAT
#undef VSC_F_MAIN
#undef L0
#undef L1
......@@ -638,9 +638,9 @@ void SES_Charge(struct sess *sp);
/* cache_shmlog.c */
void VSL_Init(void);
#ifdef VSL_ENDMARKER
void VSL(enum shmlogtag tag, int id, const char *fmt, ...);
void WSLR(struct worker *w, enum shmlogtag tag, int id, txt t);
void WSL(struct worker *w, enum shmlogtag tag, int id, const char *fmt, ...);
void VSL(enum vsl_tag tag, int id, const char *fmt, ...);
void WSLR(struct worker *w, enum vsl_tag tag, int id, txt t);
void WSL(struct worker *w, enum vsl_tag tag, int id, const char *fmt, ...);
void WSL_Flush(struct worker *w, int overflow);
#define DSL(flag, tag, id, ...) \
......
......@@ -64,14 +64,14 @@ SVNID("$Id$")
LOGMTX2(ax, HTTP_HDR_FIRST, Header), \
}
static const enum shmlogtag logmtx[][HTTP_HDR_FIRST + 1] = {
static const enum vsl_tag logmtx[][HTTP_HDR_FIRST + 1] = {
[HTTP_Rx] = LOGMTX1(Rx),
[HTTP_Tx] = LOGMTX1(Tx),
[HTTP_Obj] = LOGMTX1(Obj)
};
/*lint -restore */
static enum shmlogtag
static enum vsl_tag
http2shmlog(const struct http *hp, int t)
{
......
......@@ -96,9 +96,9 @@ wrk_sumstat(struct worker *w)
Lck_AssertHeld(&wstat_mtx);
#define L0(n)
#define L1(n) (VSL_stats->n += w->stats.n)
#define MAC_STAT(n, t, l, f, d) L##l(n);
#define VSC_F_MAIN(n, t, l, f, d) L##l(n);
#include "vsc_fields.h"
#undef MAC_STAT
#undef VSC_F_MAIN
#undef L0
#undef L1
memset(&w->stats, 0, sizeof w->stats);
......
......@@ -53,7 +53,7 @@ vsl_w0(uint32_t type, uint32_t length)
/*--------------------------------------------------------------------*/
static inline void
vsl_hdr(enum shmlogtag tag, uint32_t *p, unsigned len, unsigned id)
vsl_hdr(enum vsl_tag tag, uint32_t *p, unsigned len, unsigned id)
{
assert(((uintptr_t)p & 0x3) == 0);
......@@ -121,7 +121,7 @@ vsl_get(unsigned len, unsigned records, unsigned flushes)
*/
static void
VSLR(enum shmlogtag tag, int id, const char *b, unsigned len)
VSLR(enum vsl_tag tag, int id, const char *b, unsigned len)
{
uint32_t *p;
unsigned mlen;
......@@ -141,7 +141,7 @@ VSLR(enum shmlogtag tag, int id, const char *b, unsigned len)
/*--------------------------------------------------------------------*/
void
VSL(enum shmlogtag tag, int id, const char *fmt, ...)
VSL(enum vsl_tag tag, int id, const char *fmt, ...)
{
va_list ap;
unsigned n, mlen = params->shm_reclen;
......@@ -191,7 +191,7 @@ WSL_Flush(struct worker *w, int overflow)
/*--------------------------------------------------------------------*/
void
WSLR(struct worker *w, enum shmlogtag tag, int id, txt t)
WSLR(struct worker *w, enum vsl_tag tag, int id, txt t)
{
unsigned l, mlen;
......@@ -223,7 +223,7 @@ WSLR(struct worker *w, enum shmlogtag tag, int id, txt t)
/*--------------------------------------------------------------------*/
void
WSL(struct worker *w, enum shmlogtag tag, int id, const char *fmt, ...)
WSL(struct worker *w, enum vsl_tag tag, int id, const char *fmt, ...)
{
va_list ap;
char *p;
......
......@@ -81,11 +81,11 @@ mcf_stats(struct cli *cli, const char * const *av, void *priv)
(void)priv;
AN(VSL_stats);
#define MAC_STAT(n, t, l, f, d) \
#define VSC_F_MAIN(n, t, l, f, d) \
if (VSL_stats->n != 0) \
cli_out(cli, "%12ju %s\n", (VSL_stats->n), d);
#include "vsc_fields.h"
#undef MAC_STAT
#undef VSC_F_MAIN
}
/*--------------------------------------------------------------------*/
......
......@@ -293,7 +293,7 @@ mgt_SHM_Init(const char *l_arg)
*pp = *params;
params = pp;
vsl_log_start = mgt_SHM_Alloc(s1, VSM_CLASS_LOG, "", "");
vsl_log_start = mgt_SHM_Alloc(s1, VSL_CLASS, "", "");
AN(vsl_log_start);
vsl_log_end = (void*)((uint8_t *)vsl_log_start + s1);
vsl_log_nxt = vsl_log_start + 1;
......
......@@ -148,7 +148,7 @@ update(struct VSL_data *vd)
}
static int
h_hist(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
h_hist(void *priv, enum vsl_tag tag, unsigned fd, unsigned len,
unsigned spec, const char *ptr)
{
double b;
......
......@@ -75,7 +75,7 @@ name2tag(const char *n)
static struct vsb *ob[65536];
static unsigned char flg[65536];
static enum shmlogtag last[65536];
static enum vsl_tag last[65536];
#define F_INVCL (1 << 0)
#define F_MATCH (1 << 1)
......@@ -112,7 +112,7 @@ clean_order(void)
}
static int
h_order(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
h_order(void *priv, enum vsl_tag tag, unsigned fd, unsigned len,
unsigned spec, const char *ptr)
{
char type;
......
......@@ -178,7 +178,7 @@ trimline(const char *str, const char *end)
}
static int
collect_backend(struct logline *lp, enum shmlogtag tag, unsigned spec,
collect_backend(struct logline *lp, enum vsl_tag tag, unsigned spec,
const char *ptr, unsigned len)
{
const char *end, *next;
......@@ -261,7 +261,7 @@ collect_backend(struct logline *lp, enum shmlogtag tag, unsigned spec,
}
static int
collect_client(struct logline *lp, enum shmlogtag tag, unsigned spec,
collect_client(struct logline *lp, enum vsl_tag tag, unsigned spec,
const char *ptr, unsigned len)
{
const char *end, *next;
......@@ -353,7 +353,7 @@ collect_client(struct logline *lp, enum shmlogtag tag, unsigned spec,
}
static int
h_ncsa(void *priv, enum shmlogtag tag, unsigned fd,
h_ncsa(void *priv, enum vsl_tag tag, unsigned fd,
unsigned len, unsigned spec, const char *ptr)
{
struct logline *lp;
......
......@@ -97,7 +97,7 @@ isequal(const char *str, const char *reference, const char *end)
*/
struct message {
enum shmlogtag tag;
enum vsl_tag tag;
size_t len;
char *ptr;
VSTAILQ_ENTRY(message) list;
......@@ -500,7 +500,7 @@ replay_thread(void *arg)
char space[1] = " ", crlf[2] = "\r\n";
struct replay_thread *thr = arg;
struct message *msg;
enum shmlogtag tag;
enum vsl_tag tag;
size_t len;
char *ptr;
const char *next;
......@@ -642,7 +642,7 @@ clear:
}
static int
gen_traffic(void *priv, enum shmlogtag tag, unsigned fd,
gen_traffic(void *priv, enum vsl_tag tag, unsigned fd,
unsigned len, unsigned spec, const char *ptr)
{
struct replay_thread *thr;
......
......@@ -148,7 +148,7 @@ update(struct VSL_data *vd)
}
static int
h_hist(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
h_hist(void *priv, enum vsl_tag tag, unsigned fd, unsigned len,
unsigned spec, const char *ptr)
{
double b;
......
......@@ -116,7 +116,7 @@ void VSL_Close(struct VSL_data *vd);
/* shmlog.c */
typedef int vsl_handler(void *priv, enum shmlogtag tag, unsigned fd,
typedef int vsl_handler(void *priv, enum vsl_tag tag, unsigned fd,
unsigned len, unsigned spec, const char *ptr);
#define VSL_S_CLIENT (1 << 0)
#define VSL_S_BACKEND (1 << 1)
......
......@@ -36,15 +36,15 @@
#define VSC_TYPE_MAIN ""
struct vsc_main {
#define MAC_STAT(n, t, l, f, e) t n;
#define VSC_F_MAIN(n, t, l, f, e) t n;
#include "vsc_fields.h"
#undef MAC_STAT
#undef VSC_F_MAIN
};
#define VSC_TYPE_SMA "SMA"
struct vsc_sma {
#define MAC_STAT_SMA(n, t, l, f, e) t n;
#define VSC_F_SMA(n, t, l, f, e) t n;
#include "vsc_fields.h"
#undef MAC_STAT_SMA
#undef VSC_F_SMA
};
This diff is collapsed.
......@@ -36,7 +36,7 @@
#ifndef SHMLOG_H_INCLUDED
#define SHMLOG_H_INCLUDED
#define VSM_CLASS_LOG "Log"
#define VSL_CLASS "Log"
/*
* Shared memory log format
......@@ -67,7 +67,7 @@
* The identifiers in shmlogtag are "SLT_" + XML tag. A script may be run
* on this file to extract the table rather than handcode it
*/
enum shmlogtag {
enum vsl_tag {
#define SLTM(foo) SLT_##foo,
#include "vsl_tags.h"
#undef SLTM
......
......@@ -230,7 +230,7 @@ VSL_Dispatch(struct VSL_data *vd, vsl_handler *func, void *priv)
/*--------------------------------------------------------------------*/
int
VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
VSL_H_Print(void *priv, enum vsl_tag tag, unsigned fd, unsigned len,
unsigned spec, const char *ptr)
{
FILE *fo = priv;
......@@ -265,7 +265,7 @@ VSL_OpenLog(struct VSL_data *vd)
struct vsm_chunk *sha;
CHECK_OBJ_NOTNULL(vd, VSL_MAGIC);
sha = vsl_find_alloc(vd, VSM_CLASS_LOG, "", "");
sha = vsl_find_alloc(vd, VSL_CLASS, "", "");
assert(sha != NULL);
vd->log_start = VSM_PTR(sha);
......
......@@ -114,7 +114,7 @@ iter_main(const struct VSL_data *vd, struct vsm_chunk *sha, vsl_stat_f *func,
sp.class = "";
sp.ident = "";
#define MAC_STAT(nn, tt, ll, ff, dd) \
#define VSC_F_MAIN(nn, tt, ll, ff, dd) \
sp.name = #nn; \
sp.fmt = #tt; \
sp.flag = ff; \
......@@ -124,7 +124,7 @@ iter_main(const struct VSL_data *vd, struct vsm_chunk *sha, vsl_stat_f *func,
if (i) \
return(i);
#include "vsc_fields.h"
#undef MAC_STAT
#undef VSC_F_MAIN
return (0);
}
......@@ -138,7 +138,7 @@ iter_sma(const struct VSL_data *vd, struct vsm_chunk *sha, vsl_stat_f *func,
sp.class = VSC_TYPE_SMA;
sp.ident = sha->ident;
#define MAC_STAT_SMA(nn, tt, ll, ff, dd) \
#define VSC_F_SMA(nn, tt, ll, ff, dd) \
sp.name = #nn; \
sp.fmt = #tt; \
sp.flag = ff; \
......@@ -148,7 +148,7 @@ iter_sma(const struct VSL_data *vd, struct vsm_chunk *sha, vsl_stat_f *func,
if (i) \
return(i);
#include "vsc_fields.h"
#undef MAC_STAT_SMA
#undef VSC_F_SMA
return (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