mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: John Garry <john.garry@huawei.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>
Subject: Re: [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1 json
Date: Wed, 6 Oct 2021 09:43:36 +0100	[thread overview]
Message-ID: <0743bf83-2e5d-8830-61bc-ed0731db108d@arm.com> (raw)
In-Reply-To: <b7a4a1b3-3d22-7a52-75b1-66c04b57a50c@huawei.com>



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


  reply	other threads:[~2021-10-06  8:43 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 [this message]
2021-10-06 16:26     ` John Garry
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=0743bf83-2e5d-8830-61bc-ed0731db108d@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrew.kilroy@arm.com \
    --cc=john.garry@huawei.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®