Lines Matching full:ids

25 	struct ids {
27 * When creating ids, holds the working set of event ids. NULL
30 struct hashmap *ids;
32 * The metric value. When not creating ids this is the value
34 * creating ids the value is either a constant or BOTTOM. NAN is
39 } ids;
54 %type <ids> expr if_expr
55 %destructor { ids__free($$.ids); } <ids>
68 * During compute ids, the special "bottom" value uses NAN to represent the set
73 /* During computing ids, does val represent a constant (non-BOTTOM) value? */
79 static struct ids union_expr(struct ids ids1, struct ids ids2)
81 struct ids result = {
83 .ids = ids__union(ids1.ids, ids2.ids),
88 static struct ids handle_id(struct expr_parse_ctx *ctx, char *id,
91 struct ids result;
106 result.ids = NULL;
114 result.ids = ids__new();
115 if (!result.ids || ids__insert(result.ids, id)) {
116 pr_err("Error creating IDs for '%s'", id);
124 * If we're not computing ids or $1 and $3 are constants, compute the new
125 * constant value using OP. Its invariant that there are no ids. If computing
126 * ids for non-constants union the set of IDs that must be computed.
130 assert(LHS.ids == NULL); \
131 assert(RHS.ids == NULL); \
137 RESULT.ids = NULL; \
148 ctx->ids = ids__union($1.ids, ctx->ids);
163 $$.ids = $5.ids;
164 ids__free($1.ids);
165 ids__free($3.ids);
168 * If ids aren't computed then treat the expression as true. If
169 * ids are being computed and the IF expr is a non-zero
173 $$.ids = $1.ids;
174 ids__free($3.ids);
175 ids__free($5.ids);
182 $$.ids = NULL;
183 ids__free($1.ids);
184 ids__free($3.ids);
185 ids__free($5.ids);
200 $$.ids = NULL;
207 $$.ids = NULL;
213 $$.ids = NULL;
219 assert($1.ids == NULL);
220 assert($3.ids == NULL);
221 $$.ids = NULL;
224 assert($1.ids == NULL);
229 $$.ids = NULL;
230 ids__free($3.ids);
233 assert($3.ids == NULL);
238 $$.ids = NULL;
239 ids__free($1.ids);
248 assert($1.ids == NULL);
249 assert($3.ids == NULL);
251 $$.ids = NULL;
253 assert($1.ids == NULL);
258 $$.ids = NULL;
259 ids__free($3.ids);
262 assert($3.ids == NULL);
267 $$.ids = NULL;
268 ids__free($1.ids);
277 assert($1.ids == NULL);
278 assert($3.ids == NULL);
280 $$.ids = NULL;
294 assert($3.ids == NULL);
296 ids__free($1.ids);
298 $$.ids = NULL;
300 assert($1.ids == NULL);
301 assert($3.ids == NULL);
303 $$.ids = NULL;
305 /* LHS and/or RHS need computing from event IDs so union. */
315 assert($1.ids == NULL);
316 assert($3.ids == NULL);
318 $$.ids = NULL;
320 /* LHS and/or RHS need computing from event IDs so union. */
331 assert($5.ids == NULL);
333 $$.ids = NULL;
334 ids__free($3.ids);
336 assert($3.ids == NULL);
337 assert($5.ids == NULL);
339 $$.ids = NULL;
341 /* LHS and/or RHS need computing from event IDs so union. */
348 $$.ids = $2.ids;
358 $$.ids = NULL;
367 $$.ids = NULL;
375 $$.ids = NULL;