Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1875733pxb; Thu, 7 Oct 2021 17:37:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR/ndAlPpqLI5FAtTEP5npYwkjzvhbwyYMlPTaHdnTmlUmYlrm1YLCFWvcB8SlTPAOwjyI X-Received: by 2002:a05:6402:154:: with SMTP id s20mr10462323edu.253.1633653435420; Thu, 07 Oct 2021 17:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633653435; cv=none; d=google.com; s=arc-20160816; b=uCtArbYV8Bli7sIgCJ8UDDog9d1dsDePCs7gCYqYDA150DNw6I3yOY+VBVPOKQPAig +/cYOcxZW2iwNfOU8XSfcnlujrZK+J6QOzFtwSjVi2W+H+JqQQ8QNxcjerG7J+6ZMEvY bKwpH1wC5+vwbVCkmzIIMXpX4cqFezv964KfZWE/hHGpx/IBjRL+f2epQht2wlteZkId RlRlTsTsqZZKBqkliTu6px96oHjIaxBcXSSHfdGMrZXt/qCbmyXX4Wd+2gCIBkbuHGZH VX3i+Qeso01xZ/sztMF4kdX++44YWYZDAq1v99of0PkPXcJu3+aguyvys8Kl6O9V7G6q JTPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ecI+HmURQJUBTExNonr9ht3ISTdMl5+HFw48J98ieqQ=; b=AkSZXX3luxaXfUjn2aad6Ck9uwBBGMREJXEiO3R3rAcOICRtK15vvroEgLHbXVWlhy 5voeMxUSvHmyvruHUxaUzJtwmLRp15NcsrgU/wcObyvgWaKKsQlLdZ4iYCi5iVXHUdaz fVUUwbfTny1UI7wGIMDx9tirp6ayWj2ku1D6X8hVxWW2F0XMQjGYD68BS7tUqQe7XQtp JTrEsbafLNPlDPZcmn+2DiNniLHA7hkn24zyE5x6BaYxedJF20jE3qfEqsbRsgRs4APM zctLInv/iqsBTNPkriYtfO2jL5RJt9dFOX7dFC2iADg2yt/XOUyT2ndsGxogCA7yDk7M JbOA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si1140027ejm.464.2021.10.07.17.36.52; Thu, 07 Oct 2021 17:37:15 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236613AbhJHAFW (ORCPT + 99 others); Thu, 7 Oct 2021 20:05:22 -0400 Received: from mga04.intel.com ([192.55.52.120]:57364 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233133AbhJHAFU (ORCPT ); Thu, 7 Oct 2021 20:05:20 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="225174146" X-IronPort-AV: E=Sophos;i="5.85,355,1624345200"; d="scan'208";a="225174146" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 17:03:26 -0700 X-IronPort-AV: E=Sophos;i="5.85,355,1624345200"; d="scan'208";a="440455701" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.19.60]) ([10.209.19.60]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 17:03:25 -0700 Message-ID: Date: Thu, 7 Oct 2021 17:03:25 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH 1/4] perf vendor events: Syntax corrections in Neoverse N1 json Content-Language: en-US To: John Garry , James Clark , 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> <0743bf83-2e5d-8830-61bc-ed0731db108d@arm.com> <83767166-e379-a352-d920-ad8b6e923800@huawei.com> From: Andi Kleen In-Reply-To: <83767166-e379-a352-d920-ad8b6e923800@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/6/2021 9:26 AM, John Garry wrote: > 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. Sure we can modify the file. I already did some minor changes when I submitted it originally. -Andi