Motr  M0
stats_fops_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from stats/stats_fops.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "stats/stats_fops.h"
8 #include "stats/stats_fops_xc.h"
9 
16 
17 static struct _m0_uint64_seq_s {
20 } _m0_uint64_seq = {
21  ._type = {
23  .xct_name = "m0_uint64_seq",
24  .xct_sizeof = sizeof (struct m0_uint64_seq),
25  .xct_nr = 2,
26  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
27  }
28 };
29 
31 M0_BASSERT(offsetof(struct _m0_uint64_seq_s, _child[0]) ==
32  offsetof(struct m0_xcode_type, xct_child[0]));
33 
34 static struct _m0_stats_sum_s {
37 } _m0_stats_sum = {
38  ._type = {
40  .xct_name = "m0_stats_sum",
41  .xct_sizeof = sizeof (struct m0_stats_sum),
42  .xct_nr = 2,
43  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
44  }
45 };
46 
48 M0_BASSERT(offsetof(struct _m0_stats_sum_s, _child[0]) ==
49  offsetof(struct m0_xcode_type, xct_child[0]));
50 
51 static struct _m0_stats_recs_s {
54 } _m0_stats_recs = {
55  ._type = {
57  .xct_name = "m0_stats_recs",
58  .xct_sizeof = sizeof (struct m0_stats_recs),
59  .xct_nr = 2,
60  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
61  }
62 };
63 
65 M0_BASSERT(offsetof(struct _m0_stats_recs_s, _child[0]) ==
66  offsetof(struct m0_xcode_type, xct_child[0]));
67 
68 static struct _m0_stats_update_fop_s {
72  ._type = {
74  .xct_name = "m0_stats_update_fop",
75  .xct_sizeof = sizeof (struct m0_stats_update_fop),
76  .xct_nr = 1,
77  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
78  }
79 };
80 
82 M0_BASSERT(offsetof(struct _m0_stats_update_fop_s, _child[0]) ==
83  offsetof(struct m0_xcode_type, xct_child[0]));
84 
85 static struct _m0_stats_query_fop_s {
89  ._type = {
91  .xct_name = "m0_stats_query_fop",
92  .xct_sizeof = sizeof (struct m0_stats_query_fop),
93  .xct_nr = 1,
94  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
95  }
96 };
97 
99 M0_BASSERT(offsetof(struct _m0_stats_query_fop_s, _child[0]) ==
100  offsetof(struct m0_xcode_type, xct_child[0]));
101 
106  ._type = {
108  .xct_name = "m0_stats_query_rep_fop",
109  .xct_sizeof = sizeof (struct m0_stats_query_rep_fop),
110  .xct_nr = 2,
111  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
112  }
113 };
114 
116 M0_BASSERT(offsetof(struct _m0_stats_query_rep_fop_s, _child[0]) ==
117  offsetof(struct m0_xcode_type, xct_child[0]));
118 
119 
120 M0_BASSERT(sizeof(struct m0_uint64_seq) == 16U);
121 
122 M0_BASSERT(sizeof ((struct m0_uint64_seq *)0)->se_nr == 4U);
123 M0_BASSERT(offsetof(struct m0_uint64_seq, se_nr) == 0U);
124 M0_BASSERT(sizeof ((struct m0_uint64_seq *)0)->se_data == 8U);
125 M0_BASSERT(offsetof(struct m0_uint64_seq, se_data) == 8U);
126 
127 M0_BASSERT(sizeof(struct m0_stats_sum) == 24U);
128 
129 M0_BASSERT(sizeof ((struct m0_stats_sum *)0)->ss_id == 4U);
130 M0_BASSERT(offsetof(struct m0_stats_sum, ss_id) == 0U);
131 M0_BASSERT(sizeof ((struct m0_stats_sum *)0)->ss_data == 16U);
132 M0_BASSERT(offsetof(struct m0_stats_sum, ss_data) == 8U);
133 
134 M0_BASSERT(sizeof(struct m0_stats_recs) == 16U);
135 
136 M0_BASSERT(sizeof ((struct m0_stats_recs *)0)->sf_nr == 8U);
137 M0_BASSERT(offsetof(struct m0_stats_recs, sf_nr) == 0U);
138 M0_BASSERT(sizeof ((struct m0_stats_recs *)0)->sf_stats == 8U);
139 M0_BASSERT(offsetof(struct m0_stats_recs, sf_stats) == 8U);
140 
141 M0_BASSERT(sizeof(struct m0_stats_update_fop) == 16U);
142 
143 M0_BASSERT(sizeof ((struct m0_stats_update_fop *)0)->suf_stats == 16U);
145 
146 M0_BASSERT(sizeof(struct m0_stats_query_fop) == 16U);
147 
148 M0_BASSERT(sizeof ((struct m0_stats_query_fop *)0)->sqf_ids == 16U);
150 
151 M0_BASSERT(sizeof(struct m0_stats_query_rep_fop) == 24U);
152 
153 M0_BASSERT(sizeof ((struct m0_stats_query_rep_fop *)0)->sqrf_rc == 4U);
155 M0_BASSERT(sizeof ((struct m0_stats_query_rep_fop *)0)->sqrf_stats == 16U);
157 
158 
159 
160 M0_INTERNAL void m0_xc_m0_uint64_seq_struct_init(void)
161 {
162  _m0_uint64_seq._child[0] = (struct m0_xcode_field) {
163  .xf_name = "se_nr",
164 
165  .xf_type = &M0_XT_U32,
166 
167  .xf_tag = 0,
168  .xf_opaque = NULL,
169  .xf_offset = offsetof(struct m0_uint64_seq, se_nr),
170  .xf_read = NULL,
171  .xf_decor = {
173  }
174  };
175  m0_xc_u32_init();
176 
177  _m0_uint64_seq._child[1] = (struct m0_xcode_field) {
178  .xf_name = "se_data",
179 
180  .xf_type = &M0_XT_U64,
181 
182  .xf_tag = 0,
183  .xf_opaque = NULL,
184  .xf_offset = offsetof(struct m0_uint64_seq, se_data),
185  .xf_read = NULL,
186  .xf_decor = {
188  }
189  };
190  m0_xc_u64_init();
191 
193 }
194 
195 M0_INTERNAL void m0_xc_m0_stats_sum_struct_init(void)
196 {
197  _m0_stats_sum._child[0] = (struct m0_xcode_field) {
198  .xf_name = "ss_id",
199 
200  .xf_type = &M0_XT_U32,
201 
202  .xf_tag = 0,
203  .xf_opaque = NULL,
204  .xf_offset = offsetof(struct m0_stats_sum, ss_id),
205  .xf_read = NULL,
206  .xf_decor = {
208  }
209  };
210  m0_xc_u32_init();
211 
212  _m0_stats_sum._child[1] = (struct m0_xcode_field) {
213  .xf_name = "ss_data",
214 
215  .xf_type = m0_uint64_seq_xc,
216 
217  .xf_tag = 0,
218  .xf_opaque = NULL,
219  .xf_offset = offsetof(struct m0_stats_sum, ss_data),
220  .xf_read = NULL,
221  .xf_decor = {
223  }
224  };
226 
228 }
229 
230 M0_INTERNAL void m0_xc_m0_stats_recs_struct_init(void)
231 {
232  _m0_stats_recs._child[0] = (struct m0_xcode_field) {
233  .xf_name = "sf_nr",
234 
235  .xf_type = &M0_XT_U64,
236 
237  .xf_tag = 0,
238  .xf_opaque = NULL,
239  .xf_offset = offsetof(struct m0_stats_recs, sf_nr),
240  .xf_read = NULL,
241  .xf_decor = {
243  }
244  };
245  m0_xc_u64_init();
246 
247  _m0_stats_recs._child[1] = (struct m0_xcode_field) {
248  .xf_name = "sf_stats",
249 
250  .xf_type = m0_stats_sum_xc,
251 
252  .xf_tag = 0,
253  .xf_opaque = NULL,
254  .xf_offset = offsetof(struct m0_stats_recs, sf_stats),
255  .xf_read = NULL,
256  .xf_decor = {
258  }
259  };
261 
263 }
264 
266 {
268  .xf_name = "suf_stats",
269 
270  .xf_type = m0_stats_recs_xc,
271 
272  .xf_tag = 0,
273  .xf_opaque = NULL,
274  .xf_offset = offsetof(struct m0_stats_update_fop, suf_stats),
275  .xf_read = NULL,
276  .xf_decor = {
278  }
279  };
281 
283 }
284 
286 {
288  .xf_name = "sqf_ids",
289 
290  .xf_type = m0_uint64_seq_xc,
291 
292  .xf_tag = 0,
293  .xf_opaque = NULL,
294  .xf_offset = offsetof(struct m0_stats_query_fop, sqf_ids),
295  .xf_read = NULL,
296  .xf_decor = {
298  }
299  };
301 
303 }
304 
306 {
308  .xf_name = "sqrf_rc",
309 
310  .xf_type = &M0_XT_U32,
311 
312  .xf_tag = 0,
313  .xf_opaque = NULL,
314  .xf_offset = offsetof(struct m0_stats_query_rep_fop, sqrf_rc),
315  .xf_read = NULL,
316  .xf_decor = {
318  }
319  };
320  m0_xc_u32_init();
321 
323  .xf_name = "sqrf_stats",
324 
325  .xf_type = m0_stats_recs_xc,
326 
327  .xf_tag = 0,
328  .xf_opaque = NULL,
329  .xf_offset = offsetof(struct m0_stats_query_rep_fop, sqrf_stats),
330  .xf_read = NULL,
331  .xf_decor = {
333  }
334  };
336 
338 }
339 
340 M0_INTERNAL void m0_xc_stats_stats_fops_init(void)
341 {
348 }
349 
350 M0_INTERNAL void m0_xc_stats_stats_fops_fini(void)
351 {
352 }
struct m0_xcode_type * m0_stats_recs_xc
Definition: stats_fops_xc.c:12
#define NULL
Definition: misc.h:38
struct m0_xcode_field _child[1]
Definition: stats_fops_xc.c:70
M0_INTERNAL void m0_xc_m0_stats_update_fop_struct_init(void)
struct m0_xcode_type _type
Definition: stats_fops_xc.c:69
struct m0_xcode_type _type
Definition: stats_fops_xc.c:52
static struct _m0_stats_sum_s _m0_stats_sum
struct m0_xcode_type * m0_stats_query_rep_fop_xc
Definition: stats_fops_xc.c:15
struct m0_xcode_type * m0_stats_query_fop_xc
Definition: stats_fops_xc.c:14
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * m0_uint64_seq_xc
Definition: stats_fops_xc.c:10
struct m0_xcode_type * m0_stats_update_fop_xc
Definition: stats_fops_xc.c:13
struct m0_xcode_field _child[2]
Definition: stats_fops_xc.c:53
struct m0_xcode_type _type
Definition: stats_fops_xc.c:35
struct m0_xcode_field _child[2]
Definition: stats_fops_xc.c:36
M0_INTERNAL void m0_xc_m0_stats_sum_struct_init(void)
static struct _m0_stats_query_fop_s _m0_stats_query_fop
int32_t sqrf_rc
Definition: stats_fops.h:120
uint64_t * se_data
Definition: stats_fops.h:122
uint32_t se_nr
Definition: stats_fops.h:120
static struct _m0_stats_query_rep_fop_s _m0_stats_query_rep_fop
M0_INTERNAL void m0_xc_stats_stats_fops_fini(void)
M0_INTERNAL void m0_xc_m0_uint64_seq_struct_init(void)
struct m0_xcode_type _type
Definition: stats_fops_xc.c:86
static struct _m0_stats_update_fop_s _m0_stats_update_fop
struct m0_uint64_seq sqf_ids
Definition: stats_fops.h:121
static struct _m0_uint64_seq_s _m0_uint64_seq
M0_INTERNAL void m0_xc_m0_stats_query_rep_fop_struct_init(void)
M0_INTERNAL void m0_xc_stats_stats_fops_init(void)
struct m0_stats_recs suf_stats
Definition: stats_fops.h:120
#define M0_POST(cond)
struct m0_xcode_field _child[1]
Definition: stats_fops_xc.c:87
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_xcode_type _type
Definition: stats_fops_xc.c:18
uint64_t sf_nr
Definition: stats_fops.h:121
struct m0_uint64_seq ss_data
Definition: stats_fops.h:122
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_INTERNAL void m0_xc_m0_stats_recs_struct_init(void)
M0_INTERNAL void m0_xc_m0_stats_query_fop_struct_init(void)
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_stats_recs sqrf_stats
Definition: stats_fops.h:121
struct m0_stats_sum * sf_stats
Definition: stats_fops.h:123
struct m0_fid ss_id
Definition: ss_fops.h:111
struct m0_xcode_field _child[2]
Definition: stats_fops_xc.c:19
void m0_xc_u32_init(void)
Definition: xcode.c:900
M0_BASSERT(offsetof(struct _m0_uint64_seq_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type _type
const char * xf_name
Definition: xcode.h:251
struct m0_xcode_field _child[2]
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * m0_stats_sum_xc
Definition: stats_fops_xc.c:11
static struct _m0_stats_recs_s _m0_stats_recs