[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC_TJvfQCjZPS50-k2Pxo0jCcfxQ7oa1MZxQdADyjnwQ_TBzRA@mail.gmail.com>
Date: Wed, 20 Oct 2021 08:06:26 -0700
From: Kalesh Singh <kaleshsingh@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Suren Baghdasaryan <surenb@...gle.com>,
Hridya Valsaraju <hridya@...gle.com>,
Namhyung Kim <namhyung@...nel.org>,
"Cc: Android Kernel" <kernel-team@...roid.com>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...hat.com>, Shuah Khan <shuah@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Tom Zanussi <zanussi@...nel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v2 3/5] tracing: Fix operator precedence for hist triggers expression
On Wed, Oct 20, 2021 at 7:28 AM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Tue, 19 Oct 2021 18:31:40 -0700
> Kalesh Singh <kaleshsingh@...gle.com> 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
Powered by blists - more mailing lists