[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0743bf83-2e5d-8830-61bc-ed0731db108d@arm.com>
Date: Wed, 6 Oct 2021 09:43:36 +0100
From: James Clark <james.clark@....com>
To: John Garry <john.garry@...wei.com>,
Andrew Kilroy <andrew.kilroy@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"acme@...nel.org" <acme@...nel.org>
Cc: Will Deacon <will@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1
json
On 05/10/2021 11:10, John Garry wrote:
> On 04/10/2021 17:00, Andrew Kilroy wrote:
>> There are some syntactical mistakes in the json files for the Cortex A76
>> N1 (Neoverse N1). This was obstructing parsing from an external tool.
>
> If the trailing comma is not allowed by standard, then maybe we should fix our parsing tool to not allow it also. However maybe there is a good reason why we allow it..
It would be nice to do, because I have also made similar fixes before. We looked at the STRICT option
in the parser (https://github.com/zserge/jsmn), but even then it seems to allow trailing commas.
Trailing commas are not allowed in the json standard, but there is a split between parsers
where some allow it and others don't. Specifically the Python parser doesn't allow it, and Python
can easily be involved in some workflow that parses these files.
The only way forwards I can think of is either getting a change accepted upstream to the parser
and then updating it in perf, switching to a different parser, or doing some hack to add an extra
step in perf to look for commas. None of which sound ideal.
James
Powered by blists - more mailing lists