[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1627566986-30605-11-git-send-email-john.garry@huawei.com>
Date: Thu, 29 Jul 2021 21:56:25 +0800
From: John Garry <john.garry@...wei.com>
To: <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
<mark.rutland@....com>, <alexander.shishkin@...ux.intel.com>,
<jolsa@...hat.com>, <namhyung@...nel.org>
CC: <yao.jin@...ux.intel.com>, <linux-kernel@...r.kernel.org>,
<linux-perf-users@...r.kernel.org>, <irogers@...gle.com>,
<linuxarm@...wei.com>, John Garry <john.garry@...wei.com>
Subject: [PATCH 10/11] perf jevents: Print SoC name per system event table
Print the SoC name per system event table, which will allow the test SoC be
identified by the pmu-events test.
Signed-off-by: John Garry <john.garry@...wei.com>
---
tools/perf/pmu-events/jevents.c | 3 ++-
tools/perf/pmu-events/pmu-events.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
index 405bdd36b9b9..6731b3cf0c2f 100644
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
@@ -836,7 +836,8 @@ static int process_system_event_tables(FILE *outfp)
print_system_event_mapping_table_prefix(outfp);
list_for_each_entry(sys_event_table, &sys_event_tables, list) {
- fprintf(outfp, "\n\t{\n\t\t.table = %s,\n\t},",
+ fprintf(outfp, "\n\t{\n\t\t.table = %s,\n\t\t.name = \"%s\",\n\t},",
+ sys_event_table->soc_id,
sys_event_table->soc_id);
}
diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
index d1172f6aebf1..5c2bf7275c1c 100644
--- a/tools/perf/pmu-events/pmu-events.h
+++ b/tools/perf/pmu-events/pmu-events.h
@@ -45,6 +45,7 @@ struct pmu_events_map {
};
struct pmu_sys_events {
+ const char *name;
struct pmu_event *table;
};
--
2.26.2
Powered by blists - more mailing lists