All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Tom Zanussi <zanussi@kernel.org>
Subject: Re: [PATCH 2/4] tracing/hist: Call hist functions directly via a switch statement
Date: Tue, 6 Sep 2022 17:38:30 -0400	[thread overview]
Message-ID: <20220906173830.3d453f1b@gandalf.local.home> (raw)
In-Reply-To: <20220905224849.80af1cb24d9eed1c1cdbcaee@kernel.org>

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

  parent reply	other threads:[~2022-09-06 21:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 21:46 [PATCH 0/4] tracing: Have filters and histograms use a call table instead of pointers Steven Rostedt
2022-08-23 21:46 ` [PATCH 1/4] tracing: Add numeric delta time to the trace event benchmark Steven Rostedt
2022-08-23 21:46 ` [PATCH 2/4] tracing/hist: Call hist functions directly via a switch statement Steven Rostedt
2022-09-05 13:48   ` Masami Hiramatsu
2022-09-05 15:29     ` Steven Rostedt
2022-09-06 21:38     ` Steven Rostedt [this message]
2022-08-23 21:46 ` [PATCH 3/4] tracing: Move struct filter_pred into trace_events_filter.c Steven Rostedt
2022-08-23 21:46 ` [PATCH 4/4] tracing/filter: Call filter predicate functions directly via a switch statement Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220906173830.3d453f1b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=zanussi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.