Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1596204pxb; Wed, 20 Oct 2021 08:09:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA2znkot7r++6QqV4KLayHsNK0pQPkBEuJSZhxZIR8TBrUK26TWJmoVbVmSpFqxiJ6yAMz X-Received: by 2002:a05:6402:13ce:: with SMTP id a14mr66035edx.64.1634742584899; Wed, 20 Oct 2021 08:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634742584; cv=none; d=google.com; s=arc-20160816; b=knFpd+DBGicWkCRbrgAxO297+pqWOnNFri2NkBCRb5b3FOp/P1+NyCwXAfmSIKwnPS Mj5e6Kqn71Xj9LfvFrjKRJRucYDVaawCWhTUdUOZ0+gBkUh41ZITom85yf7v4M3zwgtJ CC2Xd5bf3UeB0fX5Y8Q9jRKCVqxMtCYoWeuGdJ1Gag9hd6xE/b+9A27ALU1EWyuOOhMg wRLDfyZTfQTgJ0CXUoBV5ibp5/X/CnOQNhZqmwcXue6uMMweTCjth3NazbjCsbrOlEB8 1PZPrYO2ktC2A5hFH/VPB6VQnawj7ItKG/YrN/HqA57l6dUda/5gRHwmTGndlp4m2QzP xjrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=tA5LDMLmQNAk4mwbdEDR73f2u+dlkeGRsK+VXTs6ThI=; b=rJRELOvrNYwPMJjkAvPinPFqBQHJmzZgMM8Z0X10efbOJONxkpciija3tOTphYRFIn bvGVDbJcYiV46v48QmHj2bYuUjlh2aNjpJ0EuqIn2HIy9avs9YBOXKrKDKcYJWXzz6fy /iM3LUzQ15BD1lqtxRqNUub2aVdJAWIj6PgGgyYlpKAKOQT7GKTuXvcVi2ayTH1ERH1u 7Cxz5qYcWdIZbeYBHw1AK4ughMPYE3era39Fy1htPeK+R5BvgaVC753q4yyZrl60O005 Y14PbBWlxLKDy5foCAZmqlNF/Xl2WzyP2mrTDMX3/n4mEke3gi9czol/UU0ef8GOxF80 4mHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qw0BgtZf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si3577648edb.330.2021.10.20.08.09.17; Wed, 20 Oct 2021 08:09:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qw0BgtZf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbhJTPIx (ORCPT + 99 others); Wed, 20 Oct 2021 11:08:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbhJTPIw (ORCPT ); Wed, 20 Oct 2021 11:08:52 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D22ACC061749 for ; Wed, 20 Oct 2021 08:06:37 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id 187so3206078pfc.10 for ; Wed, 20 Oct 2021 08:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tA5LDMLmQNAk4mwbdEDR73f2u+dlkeGRsK+VXTs6ThI=; b=qw0BgtZf/0TzG5SWIZCjab5Al2kESh2kxIpGfkr6TDKXJZU6o/MsqgiR7dsR84o5CD zNojPvHgJOdIPYTtXIczvYFyhqVQsH0cpLBzqOEa2AB+UeC2GyoYaabJ/xohhIendpuC +diUEFPxJMiNRN+OZrTkpY0as7zQcor4Cz4dKD2hYCR1oUbUE5z5wKzNLgjbNLBSD9Qs gLKdzvEwnevqbfqOReLyXugBaxsi3q4ie4OGwhOWF15zfHLaIOaeWaIk2cAMA89ju1Dr 2Gg+lu0sOyewXKe/TWhFIwBHcaSzsu4gLVqlLA2HUptThhmpgsMx3evpjdII3cW4jvu1 19Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tA5LDMLmQNAk4mwbdEDR73f2u+dlkeGRsK+VXTs6ThI=; b=inLxrHcYSXFQ3e0LsNVXXUd3NsFaMVGtVs6qEur6JPuBZydZ6IRe66d/cIQUPTCJqv SX4reF6hVZQ80mLHnC+r//lw2qkouUHOMP2bq/TDkPGOliNmKHTjO5PKYBc0uzoURLic uWYfQoYP2VBIctHahKAV+b5zHxb2pAVM3+vCp3gD4tKQKY0kRbUUg96AtO/C2ia1JfMH O5BGL2Q5kSDdaKusfSpO4kzKj8/wkc/5gGjyuKQ9jvMEAfUP0k0mQ8mgj17vdhXzXrTi RnOwjnvt8qnmh+Jb6TR/3GXRPOewhvy/aYav8rnWOiN5DFYpbb5KJf92kkb3i0z9pCZS AqLg== X-Gm-Message-State: AOAM533qW7uu/UbcXhpbSojmhGzOyfpkCBW7sD7/qK/l9s//whPmEgUq JL1eTtCT2s+mDTw6AfPBKe5ueQbLVlioStORbigmjQ== X-Received: by 2002:a05:6a00:17a6:b0:44d:df1f:5626 with SMTP id s38-20020a056a0017a600b0044ddf1f5626mr274186pfg.59.1634742396800; Wed, 20 Oct 2021 08:06:36 -0700 (PDT) MIME-Version: 1.0 References: <20211020013153.4106001-1-kaleshsingh@google.com> <20211020013153.4106001-4-kaleshsingh@google.com> <20211020102807.0b07bc81@gandalf.local.home> In-Reply-To: <20211020102807.0b07bc81@gandalf.local.home> From: Kalesh Singh Date: Wed, 20 Oct 2021 08:06:26 -0700 Message-ID: Subject: Re: [PATCH v2 3/5] tracing: Fix operator precedence for hist triggers expression To: Steven Rostedt Cc: Suren Baghdasaryan , Hridya Valsaraju , Namhyung Kim , "Cc: Android Kernel" , Jonathan Corbet , Ingo Molnar , Shuah Khan , Masami Hiramatsu , Tom Zanussi , "open list:DOCUMENTATION" , LKML , "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 7:28 AM Steven Rostedt wrote: > > On Tue, 19 Oct 2021 18:31:40 -0700 > Kalesh Singh wrote: > > > + minus_op = strrchr(str, '-'); > > + if (minus_op) { > > + /* Unfortunately, the modifier ".sym-offset" can confuse things. */ > > + if (minus_op - str >= 4 && !strncmp(minus_op - 4, ".sym-offset", 11)) > > + goto out; > > > > I was thinking about this, and perhaps we can add this later, but we could > just replace all ".sym-offset" with ".symXoffset" after receiving it from > the user. Then it won't be an issue during prasing. That's a good idea. It would clean things up a bit and avoid bailing out if the user has a sym-offest in an expression string. I can send a separate patch for this. > > -- Steve