From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 510D3C00144 for ; Fri, 29 Jul 2022 08:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235201AbiG2IaD (ORCPT ); Fri, 29 Jul 2022 04:30:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235025AbiG2I37 (ORCPT ); Fri, 29 Jul 2022 04:29:59 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69E295A8A9; Fri, 29 Jul 2022 01:29:57 -0700 (PDT) Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LvLFP1j6vz67XvQ; Fri, 29 Jul 2022 16:26:01 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Jul 2022 10:29:54 +0200 Received: from [10.195.35.4] (10.195.35.4) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Jul 2022 09:29:53 +0100 Message-ID: <393770c6-8469-a5b5-5106-a98420bb6e00@huawei.com> Date: Fri, 29 Jul 2022 09:29:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3 05/17] perf jevents: Remove the type/version variables To: Ian Rogers , 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 , , , CC: Stephane Eranian References: <20220729074351.138260-1-irogers@google.com> <20220729074351.138260-6-irogers@google.com> From: John Garry In-Reply-To: <20220729074351.138260-6-irogers@google.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.195.35.4] X-ClientProxiedBy: lhreml734-chm.china.huawei.com (10.201.108.85) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/07/2022 08:43, Ian Rogers wrote: > 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 Reviewed-by: John Garry Please note the questions, below. > --- > tools/perf/pmu-events/empty-pmu-events.c | 6 ++---- > 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, 2 insertions(+), 16 deletions(-) > > diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c > index 77e655c6f116..4182a986f505 100644 > --- a/tools/perf/pmu-events/empty-pmu-events.c > +++ b/tools/perf/pmu-events/empty-pmu-events.c > @@ -110,15 +110,13 @@ static const struct pmu_event pme_test_soc_cpu[] = { > > const struct pmu_events_map pmu_events_map[] = { > { > + .arch = "testarch", Is this really supposed to be part of this patch? > .cpuid = "testcpu", > - .version = "v1", > - .type = "core", > .table = pme_test_soc_cpu, > }, > { > + .arch = 0, Same as above > .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 e6e6c42c3f8a..98d18d5c3830 100755 > --- a/tools/perf/pmu-events/jevents.py > +++ b/tools/perf/pmu-events/jevents.py > @@ -312,8 +312,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, > }, > """) > @@ -329,8 +327,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} > }}, > """) > @@ -339,8 +335,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, > }; > From mboxrd@z Thu Jan 1 00:00:00 1970 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 8836FC04A68 for ; Fri, 29 Jul 2022 08:52:42 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ourDyafGnwGIj273TYb1ogKWlZxFvzI8vp7LmfNY+xM=; b=L4HIz0sG6O+tMJ unLlaTTwjsmT+7PgqdASGo5+fMv0zl3rAPZ59kktIi9kxri/g7KFW4C6UPJiwNrFWlcI7CmMqW+NH NJC5EYBJuESanAiPRTVzrrC+HZqGhcPNh96p40XJ7aHBf+Cp5j5GgM7/lobBjSmWUsxKGm1cpXtXK SxurZ/VlNJys/rHf/Kcxhz1vW2Zm0Fm6FPFDzitAUnqXQJlEHOC+FfjiiTUkmtmAFfdpPRxhFEhUA Yf6GKsq1keMdwSHWZ37fybz1BUbvKwiPXrVIdLMn+JakqfNeOo1su3dCt77dHXmsM5ODjuJNfaQkd AR98fF/iouKPrvF34DGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHLiN-003Ucr-Uh; Fri, 29 Jul 2022 08:51:25 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHLNp-003GU6-EC for linux-arm-kernel@lists.infradead.org; Fri, 29 Jul 2022 08:30:11 +0000 Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LvLFP1j6vz67XvQ; Fri, 29 Jul 2022 16:26:01 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Jul 2022 10:29:54 +0200 Received: from [10.195.35.4] (10.195.35.4) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Jul 2022 09:29:53 +0100 Message-ID: <393770c6-8469-a5b5-5106-a98420bb6e00@huawei.com> Date: Fri, 29 Jul 2022 09:29:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3 05/17] perf jevents: Remove the type/version variables To: Ian Rogers , 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 , , , CC: Stephane Eranian References: <20220729074351.138260-1-irogers@google.com> <20220729074351.138260-6-irogers@google.com> From: John Garry In-Reply-To: <20220729074351.138260-6-irogers@google.com> X-Originating-IP: [10.195.35.4] X-ClientProxiedBy: lhreml734-chm.china.huawei.com (10.201.108.85) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220729_013009_795045_95004463 X-CRM114-Status: GOOD ( 18.37 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 29/07/2022 08:43, Ian Rogers wrote: > 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 Reviewed-by: John Garry Please note the questions, below. > --- > tools/perf/pmu-events/empty-pmu-events.c | 6 ++---- > 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, 2 insertions(+), 16 deletions(-) > > diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c > index 77e655c6f116..4182a986f505 100644 > --- a/tools/perf/pmu-events/empty-pmu-events.c > +++ b/tools/perf/pmu-events/empty-pmu-events.c > @@ -110,15 +110,13 @@ static const struct pmu_event pme_test_soc_cpu[] = { > > const struct pmu_events_map pmu_events_map[] = { > { > + .arch = "testarch", Is this really supposed to be part of this patch? > .cpuid = "testcpu", > - .version = "v1", > - .type = "core", > .table = pme_test_soc_cpu, > }, > { > + .arch = 0, Same as above > .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 e6e6c42c3f8a..98d18d5c3830 100755 > --- a/tools/perf/pmu-events/jevents.py > +++ b/tools/perf/pmu-events/jevents.py > @@ -312,8 +312,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, > }, > """) > @@ -329,8 +327,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} > }}, > """) > @@ -339,8 +335,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, > }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel