Messages in this thread | | | Date | Tue, 6 Sep 2022 17:38:30 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH 2/4] tracing/hist: Call hist functions directly via a switch statement |
| |
On Mon, 5 Sep 2022 22:48:49 +0900 Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > @@ -2725,7 +2748,8 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data, > > if (var2) > > expr->operands[1] = var2; > > > > - expr->constant = op_fn(expr, NULL, NULL, NULL, NULL); > > + expr->fn_num = op_fn; > > + expr->constant = hist_fn_call(expr, NULL, NULL, NULL, NULL); > > > > expr->operands[0] = NULL; > > expr->operands[1] = NULL; > > Here, we need this; > > expr->fn_num = HIST_FIELD_FN_CONST; > > Without this fix, the binary op_fn is kept on this const field and it > causes the problem because the const field doesn't have operands.
Yep, I added it just below the function.
Thanks, I'll send a v2 (after testing the rest of the patches).
-- Steve
| |