Re: [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1 json
From: James Clark <hidden>
Date: 2021-10-06 08:43:44
Also in:
linux-arm-kernel, lkml
From: James Clark <hidden>
Date: 2021-10-06 08:43:44
Also in:
linux-arm-kernel, lkml
On 05/10/2021 11:10, John Garry wrote:
On 04/10/2021 17:00, Andrew Kilroy wrote:quoted
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