• James Clark's avatar
    perf tools: Enable strict JSON parsing · eda1a84c
    James Clark authored
    This is to ensure that the PMU event files can always be parsed by
    other tools.
    
    Testing
    =======
    
     * There are no errors when parsing files for all architectures:
         # pmu-events/jevents nds32 pmu-events/arch/ test
         # pmu-events/jevents s390 pmu-events/arch/ test
         # pmu-events/jevents powerpc pmu-events/arch/ test
         # pmu-events/jevents arm64 pmu-events/arch/ test
         # pmu-events/jevents test pmu-events/arch/ test
         # pmu-events/jevents x86 pmu-events/arch/ test
    
     * Trailing and leading commas now cause a parse error
    
     * Double commas now cause a parse error
    
     * Compilation and parsing works with strict mode disabled and enabled
    
     * A diff of the output files shows no changes
    Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
    Reviewed-by: Kajol Jain<kjain@linux.ibm.com>
    Signed-off-by: default avatarJames Clark <james.clark@arm.com>
    Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andrew.Kilroy@arm.com
    Cc: John Garry <john.garry@huawei.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Nick.Forrington@arm.com
    Cc: Will Deacon <will@kernel.org>
    Cc: linux-arm-kernel@lists.infradead.org
    Link: https://lore.kernel.org/r/20211007110543.564963-4-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    eda1a84c
jsmn.c 7.67 KB