mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: James Clark <james.clark@arm.com>,
	Andrew Kilroy <andrew.kilroy@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>,
	"acme@kernel.org" <acme@kernel.org>
Cc: Will Deacon <will@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Leo Yan <leo.yan@linaro.org>, Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1 json
Date: Wed, 6 Oct 2021 17:26:02 +0100	[thread overview]
Message-ID: <83767166-e379-a352-d920-ad8b6e923800@huawei.com> (raw)
In-Reply-To: <0743bf83-2e5d-8830-61bc-ed0731db108d@arm.com>

On 06/10/2021 09:43, James Clark wrote:

+ Andi

> 
> 
> 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.
> 

Looking at the license in jsmn.c, we seem to be ok to modify it (to 
error on non-standard trailing ',') - that parser has already apparently 
been modified in mainline.

If we do that then I hope that there are not to many violations in out 
JSONs, including downstream.

Thanks,
John

  reply	other threads:[~2021-10-06 16:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 16:00 Andrew Kilroy
2021-10-04 16:00 ` [PATCH 2/4] perf vendor events: Add new armv8 pmu events Andrew Kilroy
2021-10-05 10:01   ` John Garry
2021-10-04 16:00 ` [PATCH 3/4] perf vendor events: Categorise the Neoverse V1 counters Andrew Kilroy
2021-10-04 16:00 ` [PATCH 4/4] perf vendor events: Add the Neoverse V1 to arm64 mapfile Andrew Kilroy
2021-10-05  9:33   ` John Garry
2021-10-05 17:58     ` Arnaldo Carvalho de Melo
2021-10-06  8:20       ` Andrew Kilroy
2021-10-06  8:29         ` Andrew Kilroy
2021-10-05 10:10 ` [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1 json John Garry
2021-10-06  8:43   ` James Clark
2021-10-06 16:26     ` John Garry [this message]
2021-10-08  0:03       ` Andi Kleen
2021-10-08  2:59         ` Ian Rogers
2021-10-08 10:34           ` James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83767166-e379-a352-d920-ad8b6e923800@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrew.kilroy@arm.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=namhyung@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®