[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d6adb42-81cf-4a8b-a8c5-4b322564430c@bytedance.com>
Date: Wed, 4 Dec 2024 16:32:16 +0800
From: Yang Jihong <yangjihong@...edance.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: peterz@...radead.org, mingo@...hat.com, namhyung@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
irogers@...gle.com, adrian.hunter@...el.com, kan.liang@...ux.intel.com,
james.clark@....com, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [External] Re: [RFC 03/12] perf event action: Add parsing const
integer expr support
Hello,
On 11/29/24 04:25, Arnaldo Carvalho de Melo wrote:
> On Thu, Nov 28, 2024 at 09:35:44PM +0800, Yang Jihong wrote:
>> Support parsing of constant integer expression.
>>
>> Signed-off-by: Yang Jihong <yangjihong@...edance.com>
>> ---
>> tools/perf/util/parse-action.c | 52 ++++++++++++++++++++++++++++++++++
>> tools/perf/util/parse-action.h | 1 +
>> tools/perf/util/parse-action.l | 19 +++++++++++++
>> tools/perf/util/parse-action.y | 13 ++++++++-
>> 4 files changed, 84 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/parse-action.c b/tools/perf/util/parse-action.c
>> index 391546bf3d73..3b10cf9f99b3 100644
>> --- a/tools/perf/util/parse-action.c
>> +++ b/tools/perf/util/parse-action.c
>> @@ -7,6 +7,7 @@
>> *
>> * Supported expressions:
>> * - constant:
>> + * - integer
>
> And now there are alignment differences and no : ?
This indicates that integer expression is a subclass of constant
expression, so integer is indented inside constant.
>
>> */
>>
>> #include "util/debug.h"
>> @@ -118,7 +119,58 @@ void event_actions__free(void)
>> (void)event_actions__for_each_expr_safe(do_action_free, NULL, false);
>> }
>>
>> +static int expr_const_int_new(struct evtact_expr *expr, void *data, int size)
>> +{
>> + if (data == NULL ||
>> + (size != sizeof(int)
>> + && size != sizeof(long) && size != sizeof(long long))) {
>
> && should be at the end of the previous line, just like you did with the
> || at the end of the first line
Okay, will fix in next version.
Thanks,
Yang
Powered by blists - more mailing lists