Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp123157imn; Fri, 29 Jul 2022 01:40:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZsjatBSJP5d1ajDnHt3xtSA8ThJXBxye29hEyPw9v6V5l0XfkIgdQN+y1VFjstcZtljXV X-Received: by 2002:a17:906:fd56:b0:72b:47b0:6bfa with SMTP id wi22-20020a170906fd5600b0072b47b06bfamr2078816ejb.62.1659084029095; Fri, 29 Jul 2022 01:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659084029; cv=none; d=google.com; s=arc-20160816; b=USIkuZeHA+/DaJdCnjBaEOE/YTCRmkedHcQiwFgdoKuiZ8ViU+Io7d/YYQngbIDwaG fXx11KRFuTO6FZ0AUCV8cVg7TVTQc0klEXdWfxRJXyktrLi5aU73/81CLQdpJe0hI28H C6bKbfMwooLnMlkJ3UKYASQ4WCTqPS+LEpbvB8uRUZhTQbYHk+PRTWvVoLUH55itb7ry SIS7PbjDGFu+ZtzlkFFqYe7xlEmNUljHp5R1y15NRqVHcHPkng4oqzvBP5FMiwnNZ+Mg l0x00TuWor+dtNmH+UwMYjlxH3ZaeIy+55zQYHfgBN7tOHefY2ymQtcd+VmuOqiEiKWA zVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=DmIVszIEr72t9b9SfpCPBwn503Bd4T8aJCC8yHjXZQw=; b=H5BnY9Ai2r6hmVo8K6khB0+ivvVP2HXT9Y4mayI668t/WqwiVMjMHF56AETaJ5AOmO ZVRqTYKr8BJyQdPHpWC8E5uLfHEEbx1LhdZ4njAEiGVBQmrfFZPJuc9j/gyizMG6UHAu Nx5QR5lEY2MmXhUOFQsKnGGVYKXKRXlFTD2Wuoq2JdyhBpPUzcjsW3p+mfGUJRGi83wU Cg1W8P7S63KiGaud3BXU0wdk9MyhDRGTrfOtK7I024bJYaWS00zcwig3P5cT3dhaBRTs 3aqEQUndoWCvRTeMxRG4sig3alf5XtEtmLbn0XneviGV6JBQtgc0mx4tyQMY2UI3Vo85 ndVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a1709067c4a00b0072fa13ddca0si2558805ejp.229.2022.07.29.01.40.04; Fri, 29 Jul 2022 01:40:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235173AbiG2IaB (ORCPT + 99 others); Fri, 29 Jul 2022 04:30:01 -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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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, > }; >