From: Ian Rogers Date: Fri, 12 Aug 2022 23:09:37 +0000 (-0700) Subject: perf jevents: Remove the type/version variables X-Git-Tag: baikal/aarch64/sdk6.1~3254^2~24 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=19f055927a996fbaf02578ab6c3bbba4f7ab9bc0;p=kernel.git perf jevents: Remove the type/version variables 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 Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220812230949.683239-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c index d8cf9283e4864..4182a986f505a 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 b49a0dd946b7f..8e8462cb359ba 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 7a360792635f8..a491b117c8ac7 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 dfefe5b60eb23..dc4038f997d78 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 07b6f4ec024f0..1b811a26f4ee0 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, };