From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9A34C38145 for ; Tue, 6 Sep 2022 21:37:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbiIFVh5 (ORCPT ); Tue, 6 Sep 2022 17:37:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbiIFVhy (ORCPT ); Tue, 6 Sep 2022 17:37:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7797D9E680 for ; Tue, 6 Sep 2022 14:37:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1518E616C1 for ; Tue, 6 Sep 2022 21:37:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E28E9C433D6; Tue, 6 Sep 2022 21:37:51 +0000 (UTC) Date: Tue, 6 Sep 2022 17:38:30 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Tom Zanussi Subject: Re: [PATCH 2/4] tracing/hist: Call hist functions directly via a switch statement Message-ID: <20220906173830.3d453f1b@gandalf.local.home> In-Reply-To: <20220905224849.80af1cb24d9eed1c1cdbcaee@kernel.org> References: <20220823214606.344269352@goodmis.org> <20220823215139.658601723@goodmis.org> <20220905224849.80af1cb24d9eed1c1cdbcaee@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 5 Sep 2022 22:48:49 +0900 Masami Hiramatsu (Google) 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