Commit 40c0fef6 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Split the main stats counters into their own file.

parent 6b84197e
......@@ -206,12 +206,10 @@ struct acct {
#define L0(t, n)
#define L1(t, n) t n;
#define VSC_F(n, t, l, f, e,d) L##l(t, n)
#define VSC_DO_MAIN
struct dstat {
#include "tbl/vsc_fields.h"
#include "tbl/vsc_f_main.h"
};
#undef VSC_F
#undef VSC_DO_MAIN
#undef L0
#undef L1
......
......@@ -50,11 +50,9 @@ wrk_sumstat(struct worker *w)
Lck_AssertHeld(&wstat_mtx);
#define L0(n)
#define L1(n) (VSC_C_main->n += w->stats.n)
#define VSC_DO_MAIN
#define VSC_F(n, t, l, f, d, e) L##l(n);
#include "tbl/vsc_fields.h"
#include "tbl/vsc_f_main.h"
#undef VSC_F
#undef VSC_DO_MAIN
#undef L0
#undef L1
memset(&w->stats, 0, sizeof w->stats);
......
......@@ -15,6 +15,7 @@ pkginclude_HEADERS = \
tbl/vrt_stv_var.h \
tbl/vsc_all.h \
tbl/vsc_fields.h \
tbl/vsc_f_main.h \
tbl/vsl_tags.h \
vapi/vsm.h \
vapi/vsm_int.h \
......
......@@ -36,9 +36,7 @@ VSC_DO(LCK, lck, VSC_TYPE_LCK)
VSC_DONE(LCK, lck, VSC_TYPE_LCK)
VSC_DO(MAIN, main, VSC_TYPE_MAIN)
#define VSC_DO_MAIN
#include "tbl/vsc_fields.h"
#undef VSC_DO_MAIN
#include "tbl/vsc_f_main.h"
VSC_DONE(MAIN, main, VSC_TYPE_MAIN)
VSC_DO(SMA, sma, VSC_TYPE_SMA)
......
This diff is collapsed.
This diff is collapsed.
......@@ -28,9 +28,7 @@ int main(int argc, char **argv)
P("MAIN COUNTERS");
P("=============");
P("");
#define VSC_DO_MAIN
#include "tbl/vsc_fields.h"
#undef VSC_DO_MAIN
#include "tbl/vsc_f_main.h"
P("");
P("LOCK COUNTERS");
......
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