Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp148596pxb; Wed, 6 Oct 2021 01:44:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEsVH9wccKJxyJyl27xghpi5fxs82i//6QUTVUiVaKR+l67VRM+F+PqHzb6JYMCN3qkmRZ X-Received: by 2002:a05:6a00:a0a:b0:44c:52c9:bf25 with SMTP id p10-20020a056a000a0a00b0044c52c9bf25mr18948674pfh.24.1633509879612; Wed, 06 Oct 2021 01:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633509879; cv=none; d=google.com; s=arc-20160816; b=YGKz+lU7g/o4jNNUWp/J5EOsrAUoUSuq093NCR7nI03IcHL+qXufygHSuXZRIr71yo EUNeBb7ZXrYFjTUTBJvKAxWtovMqqSAQ5WDojfZDk/uQIUIKK8Xn264cBdFfFNaglJzh ogyYQP6Uxq6NV0N5DKjPPrpHYT069vuj+tbmjTRGU43Q59KkThYlA0wa92DPCiDiq9MG p1NbfD/d9wXyl2rk6GFvVO0+oUS1nmHaNW4JoUBIUweYR9bJw0uBT2xTZBQu2s6HJsfk MqKAng/a2o8saVcPduuY+x4bfus5B1NUzbn7sw6VkkHGY9Sa4a6cD2QYWFnEmYHw5TXo we7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=LFaQ5STw0PITu8Yj3LgNudI9GRa1xJQTf9/QR7MwUpQ=; b=r5jI8riJ2bjNp4WJPoPImeCYThKxym7gHCCGqYeXvd7rb+rqZo63U5Swx0brvhd9Nf S2hMjMnYeQJHZ4knjI02+x+jTRlhICxKbsvP/1Wzx1X6tUyqjBrJoLPsS+ITVzSsj0tL qCeSZt2Uh4E8515xHjT3/9pe/YNjKiHNEPhaQYXisCodtYAmgj7UR5F2h6vGitfD3NlR dehcZtnJH887idZcsjArH443bNqnRGXhi07Yb4+i2ieK6LE75guu2FDPknCEy87iqEyU B7iRb9beOvFMjp4Eqq++R6DjbQEXAlBglT7zUxojxW9U33gCUlhbKblVOBRfltv0sGev 94fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si5034613pjl.188.2021.10.06.01.44.24; Wed, 06 Oct 2021 01:44:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237674AbhJFIpe (ORCPT + 99 others); Wed, 6 Oct 2021 04:45:34 -0400 Received: from foss.arm.com ([217.140.110.172]:33214 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237420AbhJFIpd (ORCPT ); Wed, 6 Oct 2021 04:45:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 551EAED1; Wed, 6 Oct 2021 01:43:41 -0700 (PDT) Received: from [10.57.22.130] (unknown [10.57.22.130]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DBDE83F7B4; Wed, 6 Oct 2021 01:43:38 -0700 (PDT) Subject: Re: [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1 json To: John Garry , Andrew Kilroy , "linux-kernel@vger.kernel.org" , "linux-perf-users@vger.kernel.org" , "acme@kernel.org" Cc: Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , "linux-arm-kernel@lists.infradead.org" References: <20211004160008.21645-1-andrew.kilroy@arm.com> From: James Clark Message-ID: <0743bf83-2e5d-8830-61bc-ed0731db108d@arm.com> Date: Wed, 6 Oct 2021 09:43:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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