lkml.org 
[lkml]   [2022]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-09-06 23:38    [W:2.117 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site