Message ID | 20220804221816.1802790-7-irogers@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F6CCC25B06 for <linux-arm-kernel@archiver.kernel.org>; Thu, 4 Aug 2022 22:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=n/7SaiTC5fQM33/ZpGhiOSZ51ywBAOlAzw5ymsyLcOc=; b=QWloP+jhdG9oXXmE7y/czeh9Be eroLu3y3fNlWvZ3T465sm9w5xBa2UTjrsP1jv5xhvNJahd4o9HHJAjhWfVQB9nHhGIM/4C/wzc3zM Ic6Y2ZSy3semOI8GxzFjep/kRWKPaGBMMvc+Hz62y2XP9t2BRX2gKy6JSrSiSHJwZzXPqYQShkCPz GltiafpLC8cJnlyVM/GvYhN0pMEomJqetWcrTjzB8IZziWy0d0q37xymYWbLjKC9pAx5U+F8mm17N RUsM7Iz53kmd3WVM9t8+sbcrD2W7wPhIGZrKGT8zMrlbpuzHFgMkk89uaJ3LOL8vjVpHMEttiT2BY u5yAEV9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJjHz-009Ytq-M4; Thu, 04 Aug 2022 22:26:00 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJjAv-009W9K-43 for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2022 22:18:42 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-3230031a80fso7371157b3.5 for <linux-arm-kernel@lists.infradead.org>; Thu, 04 Aug 2022 15:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc; bh=jj3QL2VB7yeMKctZCaHc1b4ABIGklkTL3vOmKj4cY9M=; b=naXkqYvmoVUVtTztzNIGjOQUWNikWsYOV4jgsyFyUFZsEVsaKf8MXMW+zQer81F4XC MiE02JVtmba5DXcB7DEo0SVOrShXwyh+1RvYubTHhKuCLHRZiY6lUCccPNhELDCPm8Vd /CTEf/hWXLcMlwY6vw/Ptfm2HOcv2cyC5i6A976rZx1jUi5s7RqHjsAUN0YER66k0dpn bbYxMXZWYUuTpnJD4Ln1S98YScsV3aZMxMAQWEG/Ssze9SKPp/I7o6xvEjlHYC6mSkaY vCYf59JQoZkWBuNWZqVb1OSW3LguO3UGRLk1uXRHG3QhiBsTITXT21K+IBjFNE/9nAqX sdnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc; bh=jj3QL2VB7yeMKctZCaHc1b4ABIGklkTL3vOmKj4cY9M=; b=WlUpPssjRw3gvKCYkxl7+KbDGk6cdFFkRqRgPiMdNf06fnXK78BTL37wqDTR8zJeef 1Ty5dt8y7ut0csdamK1lb/prNVYiYjf2j/SHl+4iLZlOUSxSnKKuDAGg4Thnexsvd4rW 6VZukTLmejs+5wHaNPdc5Xjig5szRiV4ZLlYsut9aWazJEq1VgwX/+D9Sa4N23txg784 C7HDhzs80vRDFzdUkvnX5yP9wyeRsprPW2GxzRpd0QKfg2qVgmQnobm//V3KucXt5S5L oOLP5Ur64gwxr083m1Ebdt6l8kt7vAudA5ahDNY4OkyGYTUt3eqaPPyRG9aUHp12kM/n AM4A== X-Gm-Message-State: ACgBeo1L6VL6LjgEfBm0AANrS8UeeJRhlTcxIoCUNSirkBndSYNN2Vb7 zNa02j3U19AW3rOgKdp1fYm3f3UW+C8m X-Google-Smtp-Source: AA6agR6rZdiG6AKqT8iby13icVKn/mvs7v0tmX3sdWha8vwGpee+4AOmvaAMXvvm9MSdbSfLPmP8mirEpP+p X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:f5e1:5bc5:7dab:2b7c]) (user=irogers job=sendgmr) by 2002:a25:604:0:b0:676:c237:ddf0 with SMTP id 4-20020a250604000000b00676c237ddf0mr3204397ybg.71.1659651519224; Thu, 04 Aug 2022 15:18:39 -0700 (PDT) Date: Thu, 4 Aug 2022 15:18:05 -0700 In-Reply-To: <20220804221816.1802790-1-irogers@google.com> Message-Id: <20220804221816.1802790-7-irogers@google.com> Mime-Version: 1.0 References: <20220804221816.1802790-1-irogers@google.com> X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog Subject: [PATCH v4 06/17] perf jevents: Provide path to json file on error From: Ian Rogers <irogers@google.com> To: John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>, James Clark <james.clark@arm.com>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Andi Kleen <ak@linux.intel.com>, Zhengjun Xing <zhengjun.xing@linux.intel.com>, Ravi Bangoria <ravi.bangoria@amd.com>, Kan Liang <kan.liang@linux.intel.com>, Adrian Hunter <adrian.hunter@intel.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220804_151841_232182_117287AC X-CRM114-Status: GOOD ( 12.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Compress the pmu_event tables
|
expand
|
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index 98d18d5c3830..12d2daf3570c 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -224,7 +224,12 @@ class JsonEvent: def read_json_events(path: str) -> Sequence[JsonEvent]: """Read json events from the specified file.""" - return json.load(open(path), object_hook=lambda d: JsonEvent(d)) + + try: + return json.load(open(path), object_hook=lambda d: JsonEvent(d)) + except BaseException as err: + print(f"Exception processing {path}") + raise def preprocess_arch_std_files(archpath: str) -> None:
If a JSONDecoderError or similar is raised then it is useful to know the path. Print this and then raise the exception agan. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/pmu-events/jevents.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)