From patchwork Fri Aug 12 23:09:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 12942605 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 2EA2CC25B0F for ; Fri, 12 Aug 2022 23:11:35 +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=ayk0WDYXuyHyqebSFPKwPGqb9XTVzXpv5/jExesPsVA=; b=fJoflgUrxYlje+57MdYqD1n33O XTLDFVaJ2diq9BvE42NLpHVTMaa6JRhCRsgeod40vb3nt1USNXjndBIOdSpRyx0QDd95bf0f+Vet0 RtumQF9iZh5E+eecs55c8Rb4x56LQ/usigUYNoyGtBzN/kfBq5GY8dcYQRPwlf8R4JAQKS2ItDZVN s0BkOtC2fvkjf5TeiDpo4VIG/87t+gTcXjBfPUA41ieCM5sHdSg4GJuzHNIOUU7Rzgw8UXkYWZ0dW /0CM+/rPJx8JbpI1AGGb24WW/lQ3uzBu6zttDtVas8Wam/sPcMfF+ISwWDSnx8OqM4zgVBlXEUuOE 9iE6FOFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMdnV-000TVW-3U; Fri, 12 Aug 2022 23:10:33 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMdn1-000TAH-Ug for linux-arm-kernel@lists.infradead.org; Fri, 12 Aug 2022 23:10:06 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-31f46b4759bso18621687b3.0 for ; Fri, 12 Aug 2022 16:10:00 -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=YiyvC5KcLJL9/nnX+SFeTIrRtpkkdHYbCWBdgzmu8kY=; b=Da16TEv/4coRpuTFpJa27ZXTP77mj0yprgQil4DtOi02L2ulStByB/BXJn1UgSQSt2 ijc4vnzrQBDCVUlDRA6+lVypjyyZzeJqPXE+CyLmPMyLq00MgQM2ZrG4SYrw3I4Tr9Kg SF7DXRuh2OEB3Xwd9ZbjQhQYZsIosAlNNfpIesLnV6z6D/kOhbFp1j2t1H+UmtK2z6e5 ffyNv5Slc693/I/rscqd/qOlaGRqqONonCgtcvoinKGuoE4W0Jr4gyc8MhPJv4/jQ7fD Kzz2xVxdwSZqU9Un0j3QpcETvKwqaEdQYXMMzieTf9FuHf7WoMcIvEFQ4KCWCZ5T7TqW sdrw== 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=YiyvC5KcLJL9/nnX+SFeTIrRtpkkdHYbCWBdgzmu8kY=; b=A1fpLyI/itZlBalE5M3RSdmy9e7sPLWetQHhoSqXB5eQcQz+wCL2A6pSlbxwpX8eL1 osZ8GsGk7Ys7myWUKOmfbVzF5vxcA0g9wpVCT5//FagXvVsWGmTN7/la5sg2SAYUw1cJ qrhXAMFaDRptVSyb3HzDaOUKFcJCdEPFYWUCCYcz69H5i7FrlPg4UgfY3x2rLttJTscm dzDSAQfroq5x6x5LPxDVZO3PJe7fcYIl3HrfyWw664VK4JXsi4qQ1gDrgUx3q/ZjGYLd KWMchJVq3+hz5CIW+QG/opZfAYOeQ3JuN9AUaHuYCU42uwCyIh3kK1cNoSpVhSsSNvpT f0rg== X-Gm-Message-State: ACgBeo1ANY76OjmADe3h4bkFDizG6enMIsSSZ9YagoZC7xCb2n35Mcdt 5w9T/bjXhTfgkM6Y4cvWAIrN+UDVIwyt X-Google-Smtp-Source: AA6agR5gweXDu/o9LyYcK9Rge043hhUd0+JgvYx1OMtiTLDz0icypzu5szu4NIxcrgHjRFsQXIapBAxkT+5f X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:d668:2937:8218:c5ec]) (user=irogers job=sendgmr) by 2002:a81:144f:0:b0:31f:43ce:de37 with SMTP id 76-20020a81144f000000b0031f43cede37mr5830739ywu.142.1660345799751; Fri, 12 Aug 2022 16:09:59 -0700 (PDT) Date: Fri, 12 Aug 2022 16:09:37 -0700 In-Reply-To: <20220812230949.683239-1-irogers@google.com> Message-Id: <20220812230949.683239-3-irogers@google.com> Mime-Version: 1.0 References: <20220812230949.683239-1-irogers@google.com> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [PATCH v5 02/14] perf jevents: Remove the type/version variables 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 , Andi Kleen , Zhengjun Xing , Ravi Bangoria , Kan Liang , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Cc: Stephane Eranian , Ian Rogers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220812_161004_018836_3F9AA6DC X-CRM114-Status: GOOD ( 16.85 ) 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 pmu_events_map has a type variable that is always initialized to "core" and a version variable that is never read. Remove these from the API as it is straightforward to add them back when necessary. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/empty-pmu-events.c | 4 ---- tools/perf/pmu-events/jevents.py | 6 ------ tools/perf/pmu-events/pmu-events.h | 2 -- tools/perf/tests/expand-cgroup.c | 2 -- tools/perf/tests/parse-metric.c | 2 -- 5 files changed, 16 deletions(-) diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c index d8cf9283e486..4182a986f505 100644 --- a/tools/perf/pmu-events/empty-pmu-events.c +++ b/tools/perf/pmu-events/empty-pmu-events.c @@ -112,15 +112,11 @@ const struct pmu_events_map pmu_events_map[] = { { .arch = "testarch", .cpuid = "testcpu", - .version = "v1", - .type = "core", .table = pme_test_soc_cpu, }, { .arch = 0, .cpuid = 0, - .version = 0, - .type = 0, .table = 0, }, }; diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index b49a0dd946b7..8e8462cb359b 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -313,8 +313,6 @@ def print_mapping_table(archs: Sequence[str]) -> None: _args.output_file.write("""{ \t.arch = "testarch", \t.cpuid = "testcpu", -\t.version = "v1", -\t.type = "core", \t.table = pme_test_soc_cpu, }, """) @@ -330,8 +328,6 @@ def print_mapping_table(archs: Sequence[str]) -> None: _args.output_file.write(f"""{{ \t.arch = "{arch}", \t.cpuid = "{cpuid}", -\t.version = "{row[1]}", -\t.type = "{row[3]}", \t.table = {tblname} }}, """) @@ -340,8 +336,6 @@ def print_mapping_table(archs: Sequence[str]) -> None: _args.output_file.write("""{ \t.arch = 0, \t.cpuid = 0, -\t.version = 0, -\t.type = 0, \t.table = 0, } }; diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h index 7a360792635f..a491b117c8ac 100644 --- a/tools/perf/pmu-events/pmu-events.h +++ b/tools/perf/pmu-events/pmu-events.h @@ -40,8 +40,6 @@ struct pmu_event { struct pmu_events_map { const char *arch; const char *cpuid; - const char *version; - const char *type; /* core, uncore etc */ const struct pmu_event *table; }; diff --git a/tools/perf/tests/expand-cgroup.c b/tools/perf/tests/expand-cgroup.c index dfefe5b60eb2..dc4038f997d7 100644 --- a/tools/perf/tests/expand-cgroup.c +++ b/tools/perf/tests/expand-cgroup.c @@ -197,8 +197,6 @@ static int expand_metric_events(void) }; const struct pmu_events_map ev_map = { .cpuid = "test", - .version = "1", - .type = "core", .table = pme_test, }; diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c index 07b6f4ec024f..1b811a26f4ee 100644 --- a/tools/perf/tests/parse-metric.c +++ b/tools/perf/tests/parse-metric.c @@ -81,8 +81,6 @@ static struct pmu_event pme_test[] = { static const struct pmu_events_map map = { .cpuid = "test", - .version = "1", - .type = "core", .table = pme_test, };