From patchwork Thu Jan 26 23:36:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13117921 Return-Path: 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 C2F29C54EAA for ; Thu, 26 Jan 2023 23:44:06 +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=bkxWGPR3TlGz+uM15JP3vR4wfi33T/SQj5L5hVtkUw0=; b=l+QD80QYh4WFu+DktUXX2UPN9R u3HtiDWqv7biwJORlGtx9j9c6836tOvdYoRmlr2hIvsue8Q2NUoazzQ8ZI4aRVZrohrE7S2zdhNwD B6+HcIaFnnmJmXL+J7WWhOAFKFqesJY8gFnNvCqzaWzCnw8MgaxYySGbjg25tifHgDkGZPHdJayC2 IYUugr7ue9IRwboBr00Vcx2Fm8VGV1P0RXcIs4lE9v+sUa8JQed8MbYvIcTAGMaqT71xOcxUhYmwp DImJRaVTFecOILZotO9029a4xI2IZd9nFdTzKHigByZhfo5tjF0ymWvrZtrAGRHcT+vsNNbIPFp9C GRNgiFIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLBtJ-00CnBH-3N; Thu, 26 Jan 2023 23:42:50 +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 1pLBpC-00ClO0-Pc for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2023 23:38:36 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-4ff7c6679f2so37561607b3.12 for ; Thu, 26 Jan 2023 15:38:33 -0800 (PST) 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:subject:date:message-id:reply-to; bh=xTYdmI9og0perxBFMnwOyD8JALYBo9fFqhvIGnAB7iw=; b=pN++yaxhHw5hsqtHgPMZeHJr1T+f83UqE4aoFtt5+LAeg4UHQo6kEIwVfN/W5KzpWd NAKHo1zdw7heZJbx1WfqGp1S+SxrOx8iQQEmdAlVDg2VTtwzUZXBX9I4nN6s/ySTc+jr 3ZaRTEU2LdtjdBqC28mfYKA3RWWRWiipp0ubURRbSnB2td+dOXW6A6Z1YmXTTTs7lrMt kSSpO1HdzzSc0Io1imdV8ICez2HaQFT3vzJjPfo5xcK7Rc2m+quLXQ9DiPdQKhFDh9i9 7D6enP4ZWLDUdi03ANNOdVpbRaEKQA7hGat0dQrO/F54JVVNV8CR5DwopbFxCgwL+Ylt 8iEg== 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:subject:date:message-id:reply-to; bh=xTYdmI9og0perxBFMnwOyD8JALYBo9fFqhvIGnAB7iw=; b=fOgffaf4riTJMfwJsxY0lzbpd9Cn4sTnJ+8n5QyYVmr8KVtZ2WTnMrmwVJLIrkEOZP btI/hxq5LfC2+QBWiaC4KbwBOomuMfnumvgytf0JsC/RfOCgVkkW7L5Xis3d75AKnxi+ AUnAoE0FYRsZhL32VZ5qfFgci24/R+xWAZBjlTIUPrVSCj+E+u1Sb+Th95TsXq6NDpDn 1hHLgtn2S60RB1Opm0njJeX2eiCiyHhjsb+2T161D7QdP6TECv9JFRLvCCEEwM0DO/P8 se+OuRuYfUROti37kl+VO4GutJAy54rFCJMWn6hbb2LtPtoABGsj5QloUNOZ59w14blw ma4g== X-Gm-Message-State: AO0yUKUeV9ioGsLnffyaGFJz1Rbzdw7dj+pcWCz76Gp1+0KxxzK8/EDW adizYy7eWjwUVJBuN5Yvqm1VcMFw5Fz9 X-Google-Smtp-Source: AK7set8ogChtzu8dxXsUiUpTxkmy4XJKX0fEnPVUFfp8yLVVlaZbFvMbbtXJs9Lil32EN+jbOQsVkSj+abRi X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:b9b8:6de0:39b3:4cf7]) (user=irogers job=sendgmr) by 2002:a25:ce90:0:b0:80b:6168:a831 with SMTP id x138-20020a25ce90000000b0080b6168a831mr1670207ybe.408.1674776313147; Thu, 26 Jan 2023 15:38:33 -0800 (PST) Date: Thu, 26 Jan 2023 15:36:43 -0800 In-Reply-To: <20230126233645.200509-1-irogers@google.com> Message-Id: <20230126233645.200509-14-irogers@google.com> Mime-Version: 1.0 References: <20230126233645.200509-1-irogers@google.com> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog Subject: [PATCH v5 13/15] perf jevents: Correct bad character encoding From: Ian Rogers To: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Kim Phillips , Florian Fischer , Ravi Bangoria , Xing Zhengjun , Rob Herring , Kang Minchul , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Sandipan Das , Jing Zhang , linuxppc-dev@lists.ozlabs.org, Kajol Jain Cc: Stephane Eranian , Perry Taylor , Caleb Biggers , Ian Rogers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230126_153834_865812_D6B5C14A X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A character encoding issue added a "3D" character that breaks the metrics test. Fixes: 40769665b63d ("perf jevents: Parse metrics during conversion") --- tools/perf/pmu-events/metric_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/pmu-events/metric_test.py b/tools/perf/pmu-events/metric_test.py index ced5998bd827..e4c792428277 100644 --- a/tools/perf/pmu-events/metric_test.py +++ b/tools/perf/pmu-events/metric_test.py @@ -89,8 +89,8 @@ class TestMetricExpressions(unittest.TestCase): after = r'min((a + b if c > 1 else c + d), e + f)' self.assertEqual(ParsePerfJson(before).ToPerfJson(), after) - before =3D r'a if b else c if d else e' - after =3D r'(a if b else (c if d else e))' + before = r'a if b else c if d else e' + after = r'(a if b else (c if d else e))' self.assertEqual(ParsePerfJson(before).ToPerfJson(), after) def test_ToPython(self):