Lines Matching refs:ids

27 	struct ids {
29 * When creating ids, holds the working set of event ids. NULL
32 struct hashmap *ids;
34 * The metric value. When not creating ids this is the value
36 * creating ids the value is either a constant or BOTTOM. NAN is
41 } ids;
56 %type <ids> expr if_expr
57 %destructor { ids__free($$.ids); } <ids>
70 * During compute ids, the special "bottom" value uses NAN to represent the set
75 /* During computing ids, does val represent a constant (non-BOTTOM) value? */
81 static struct ids union_expr(struct ids ids1, struct ids ids2)
83 struct ids result = {
85 .ids = ids__union(ids1.ids, ids2.ids),
90 static struct ids handle_id(struct expr_parse_ctx *ctx, char *id,
93 struct ids result;
108 result.ids = NULL;
116 result.ids = ids__new();
117 if (!result.ids || ids__insert(result.ids, id)) {
126 * If we're not computing ids or $1 and $3 are constants, compute the new
127 * constant value using OP. Its invariant that there are no ids. If computing
128 * ids for non-constants union the set of IDs that must be computed.
132 assert(LHS.ids == NULL); \
133 assert(RHS.ids == NULL); \
139 RESULT.ids = NULL; \
150 ctx->ids = ids__union($1.ids, ctx->ids);
165 $$.ids = $5.ids;
166 ids__free($1.ids);
167 ids__free($3.ids);
170 * If ids aren't computed then treat the expression as true. If
171 * ids are being computed and the IF expr is a non-zero
175 $$.ids = $1.ids;
176 ids__free($3.ids);
177 ids__free($5.ids);
184 $$.ids = NULL;
185 ids__free($1.ids);
186 ids__free($3.ids);
187 ids__free($5.ids);
202 $$.ids = NULL;
209 $$.ids = NULL;
215 $$.ids = NULL;
221 assert($1.ids == NULL);
222 assert($3.ids == NULL);
223 $$.ids = NULL;
226 assert($1.ids == NULL);
231 $$.ids = NULL;
232 ids__free($3.ids);
235 assert($3.ids == NULL);
240 $$.ids = NULL;
241 ids__free($1.ids);
250 assert($1.ids == NULL);
251 assert($3.ids == NULL);
253 $$.ids = NULL;
255 assert($1.ids == NULL);
260 $$.ids = NULL;
261 ids__free($3.ids);
264 assert($3.ids == NULL);
269 $$.ids = NULL;
270 ids__free($1.ids);
279 assert($1.ids == NULL);
280 assert($3.ids == NULL);
282 $$.ids = NULL;
296 assert($3.ids == NULL);
298 ids__free($1.ids);
300 $$.ids = NULL;
302 assert($1.ids == NULL);
303 assert($3.ids == NULL);
305 $$.ids = NULL;
317 assert($1.ids == NULL);
318 assert($3.ids == NULL);
320 $$.ids = NULL;
333 assert($5.ids == NULL);
335 $$.ids = NULL;
336 ids__free($3.ids);
338 assert($3.ids == NULL);
339 assert($5.ids == NULL);
341 $$.ids = NULL;
350 $$.ids = $2.ids;
360 $$.ids = NULL;
369 $$.ids = NULL;
377 $$.ids = NULL;