Lines Matching full:ids

23 	struct ids {
25 * When creating ids, holds the working set of event ids. NULL
28 struct hashmap *ids;
30 * The metric value. When not creating ids this is the value
32 * creating ids the value is either a constant or BOTTOM. NAN is
37 } ids;
52 %type <ids> expr if_expr
53 %destructor { ids__free($$.ids); } <ids>
66 * During compute ids, the special "bottom" value uses NAN to represent the set
71 /* During computing ids, does val represent a constant (non-BOTTOM) value? */
77 static struct ids union_expr(struct ids ids1, struct ids ids2)
79 struct ids result = {
81 .ids = ids__union(ids1.ids, ids2.ids),
86 static struct ids handle_id(struct expr_parse_ctx *ctx, char *id,
89 struct ids result;
104 result.ids = NULL;
112 result.ids = ids__new();
113 if (!result.ids || ids__insert(result.ids, id)) {
114 pr_err("Error creating IDs for '%s'", id);
122 * If we're not computing ids or $1 and $3 are constants, compute the new
123 * constant value using OP. Its invariant that there are no ids. If computing
124 * ids for non-constants union the set of IDs that must be computed.
128 assert(LHS.ids == NULL); \
129 assert(RHS.ids == NULL); \
131 RESULT.ids = NULL; \
138 assert(LHS.ids == NULL); \
139 assert(RHS.ids == NULL); \
141 RESULT.ids = NULL; \
152 ctx->ids = ids__union($1.ids, ctx->ids);
167 $$.ids = $5.ids;
168 ids__free($1.ids);
169 ids__free($3.ids);
172 * If ids aren't computed then treat the expression as true. If
173 * ids are being computed and the IF expr is a non-zero
177 $$.ids = $1.ids;
178 ids__free($3.ids);
179 ids__free($5.ids);
186 $$.ids = NULL;
187 ids__free($1.ids);
188 ids__free($3.ids);
189 ids__free($5.ids);
204 $$.ids = NULL;
222 assert($1.ids == NULL);
223 assert($3.ids == NULL);
225 $$.ids = NULL;
227 /* LHS and/or RHS need computing from event IDs so union. */
237 assert($1.ids == NULL);
238 assert($3.ids == NULL);
240 $$.ids = NULL;
242 /* LHS and/or RHS need computing from event IDs so union. */
253 assert($5.ids == NULL);
255 $$.ids = NULL;
256 ids__free($3.ids);
258 assert($3.ids == NULL);
259 assert($5.ids == NULL);
261 $$.ids = NULL;
263 /* LHS and/or RHS need computing from event IDs so union. */
270 $$.ids = $2.ids;
280 $$.ids = NULL;
289 $$.ids = NULL;
297 $$.ids = NULL;