From 9bd4b86b3ab1f370ed108a261e5b29fda3b8b7de Mon Sep 17 00:00:00 2001
From: John Garry <john.garry@huawei.com>
Date: Thu, 29 Jul 2021 21:56:17 +0800
Subject: [PATCH 172/201] perf jevents: Relocate test events to cpu folder

mainline inclusion
from mainline-v5.15-rc1
commit 35267cea901456d16fb3841ab44347937bf0b087
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8C0CX

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=35267cea901456d16fb3841ab44347937bf0b087

----------------------------------------------------------------------

In future to add support for sys events, relocate the core and uncore
events to a cpu folder.

Signed-off-by: John Garry <john.garry@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxarm@huawei.com
Link: https //lore.kernel.org/r/1627566986-30605-3-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>
---
 .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/branch.json | 0
 .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/cache.json  | 0
 .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/other.json  | 0
 .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/uncore.json | 0
 tools/perf/pmu-events/jevents.c                                 | 2 +-
 5 files changed, 1 insertion(+), 1 deletion(-)
 rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/branch.json (100%)
 rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/cache.json (100%)
 rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/other.json (100%)
 rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/uncore.json (100%)

diff --git a/tools/perf/pmu-events/arch/test/test_cpu/branch.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/branch.json
similarity index 100%
rename from tools/perf/pmu-events/arch/test/test_cpu/branch.json
rename to tools/perf/pmu-events/arch/test/test_soc/cpu/branch.json
diff --git a/tools/perf/pmu-events/arch/test/test_cpu/cache.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/cache.json
similarity index 100%
rename from tools/perf/pmu-events/arch/test/test_cpu/cache.json
rename to tools/perf/pmu-events/arch/test/test_soc/cpu/cache.json
diff --git a/tools/perf/pmu-events/arch/test/test_cpu/other.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/other.json
similarity index 100%
rename from tools/perf/pmu-events/arch/test/test_cpu/other.json
rename to tools/perf/pmu-events/arch/test/test_soc/cpu/other.json
diff --git a/tools/perf/pmu-events/arch/test/test_cpu/uncore.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/uncore.json
similarity index 100%
rename from tools/perf/pmu-events/arch/test/test_cpu/uncore.json
rename to tools/perf/pmu-events/arch/test/test_soc/cpu/uncore.json
diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
index 776a0c660050..6768ac3832e0 100644
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
@@ -810,7 +810,7 @@ static void print_mapping_test_table(FILE *outfp)
 	fprintf(outfp, "\t.cpuid = \"testcpu\",\n");
 	fprintf(outfp, "\t.version = \"v1\",\n");
 	fprintf(outfp, "\t.type = \"core\",\n");
-	fprintf(outfp, "\t.table = pme_test_cpu,\n");
+	fprintf(outfp, "\t.table = pme_test_soc_cpu,\n");
 	fprintf(outfp, "},\n");
 }
 
-- 
2.27.0

