All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org
Subject: [PATCH 06/59] libperf: Move in the pmu hybrid support
Date: Mon,  8 Nov 2021 14:36:17 +0100	[thread overview]
Message-ID: <20211108133710.1352822-7-jolsa@kernel.org> (raw)
In-Reply-To: <20211108133710.1352822-1-jolsa@kernel.org>

Moving in libperf the pmu hybrid support.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/lib/perf/Build                         |  1 +
 tools/lib/perf/Makefile                      |  1 +
 tools/lib/perf/include/internal/pmu-hybrid.h | 33 ++++++++
 tools/lib/perf/include/internal/pmu.h        | 28 +++++++
 tools/lib/perf/pmu-hybrid.c                  | 88 ++++++++++++++++++++
 tools/perf/builtin-c2c.c                     |  2 +-
 tools/perf/builtin-list.c                    |  2 +-
 tools/perf/builtin-mem.c                     |  2 +-
 tools/perf/builtin-record.c                  |  2 +-
 tools/perf/builtin-stat.c                    |  2 +-
 tools/perf/tests/evsel-roundtrip-name.c      |  2 +-
 tools/perf/tests/parse-events.c              |  2 +-
 tools/perf/tests/perf-time-to-tsc.c          |  2 +-
 tools/perf/util/Build                        |  1 -
 tools/perf/util/cputopo.c                    |  2 +-
 tools/perf/util/evlist-hybrid.c              |  3 +-
 tools/perf/util/evsel.c                      |  2 +-
 tools/perf/util/header.c                     |  2 +-
 tools/perf/util/mem-events.c                 |  2 +-
 tools/perf/util/metricgroup.c                |  2 +-
 tools/perf/util/parse-events-hybrid.c        |  2 +-
 tools/perf/util/parse-events.c               |  2 +-
 tools/perf/util/pmu-hybrid.c                 | 88 --------------------
 tools/perf/util/pmu-hybrid.h                 | 33 --------
 tools/perf/util/pmu.c                        |  2 +-
 tools/perf/util/pmu.h                        | 27 ------
 tools/perf/util/python-ext-sources           |  1 -
 tools/perf/util/stat-display.c               |  3 +-
 28 files changed, 171 insertions(+), 168 deletions(-)
 create mode 100644 tools/lib/perf/include/internal/pmu-hybrid.h
 create mode 100644 tools/lib/perf/pmu-hybrid.c
 delete mode 100644 tools/perf/util/pmu-hybrid.c
 delete mode 100644 tools/perf/util/pmu-hybrid.h

diff --git a/tools/lib/perf/Build b/tools/lib/perf/Build
index 275ec24cad7b..006a9bef9566 100644
--- a/tools/lib/perf/Build
+++ b/tools/lib/perf/Build
@@ -10,6 +10,7 @@ libperf-y += lib.o
 libperf-y += pmu-flex.o
 libperf-y += pmu-bison.o
 libperf-y += pmu.o
+libperf-y += pmu-hybrid.o
 
 $(OUTPUT)zalloc.o: ../../lib/zalloc.c FORCE
 	$(call rule_mkdir)
diff --git a/tools/lib/perf/Makefile b/tools/lib/perf/Makefile
index bb6f53c215ad..344cfb801408 100644
--- a/tools/lib/perf/Makefile
+++ b/tools/lib/perf/Makefile
@@ -86,6 +86,7 @@ override CFLAGS += -Werror -Wall
 override CFLAGS += -fPIC
 override CFLAGS += $(INCLUDES)
 override CFLAGS += -fvisibility=hidden
+override CFLAGS += -D_GNU_SOURCE
 
 all:
 
diff --git a/tools/lib/perf/include/internal/pmu-hybrid.h b/tools/lib/perf/include/internal/pmu-hybrid.h
new file mode 100644
index 000000000000..8a2fe7abffea
--- /dev/null
+++ b/tools/lib/perf/include/internal/pmu-hybrid.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __PMU_HYBRID_H
+#define __PMU_HYBRID_H
+
+#include <linux/perf_event.h>
+#include <linux/compiler.h>
+#include <linux/list.h>
+#include <stdbool.h>
+#include <internal/pmu.h>
+
+extern struct list_head perf_pmu__hybrid_pmus;
+
+#define perf_pmu__for_each_hybrid_pmu(pmu)	\
+	list_for_each_entry(pmu, &perf_pmu__hybrid_pmus, hybrid_list)
+
+bool perf_pmu__hybrid_mounted(const char *name);
+
+struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name);
+bool perf_pmu__is_hybrid(const char *name);
+char *perf_pmu__hybrid_type_to_pmu(const char *type);
+
+static inline int perf_pmu__hybrid_pmu_num(void)
+{
+	struct perf_pmu *pmu;
+	int num = 0;
+
+	perf_pmu__for_each_hybrid_pmu(pmu)
+		num++;
+
+	return num;
+}
+
+#endif /* __PMU_HYBRID_H */
diff --git a/tools/lib/perf/include/internal/pmu.h b/tools/lib/perf/include/internal/pmu.h
index 2c742acd933c..b8a78e024f6d 100644
--- a/tools/lib/perf/include/internal/pmu.h
+++ b/tools/lib/perf/include/internal/pmu.h
@@ -12,6 +12,7 @@ enum {
 };
 
 #define PERF_PMU_FORMAT_BITS 64
+#define CPUS_TEMPLATE_CPU       "%s/bus/event_source/devices/%s/cpus"
 
 struct perf_pmu_format {
 	char *name;
@@ -20,6 +21,33 @@ struct perf_pmu_format {
 	struct list_head list;
 };
 
+struct perf_pmu_caps {
+	char *name;
+	char *value;
+	struct list_head list;
+};
+
+struct perf_event_attr;
+
+struct perf_pmu {
+	char *name;
+	char *alias_name;
+	char *id;
+	__u32 type;
+	bool selectable;
+	bool is_uncore;
+	bool is_hybrid;
+	bool auxtrace;
+	int max_precise;
+	struct perf_event_attr *default_config;
+	struct perf_cpu_map *cpus;
+	struct list_head format;  /* HEAD struct perf_pmu_format -> list */
+	struct list_head aliases; /* HEAD struct perf_pmu_alias -> list */
+	struct list_head caps;    /* HEAD struct perf_pmu_caps -> list */
+	struct list_head list;    /* ELEM */
+	struct list_head hybrid_list;
+};
+
 int perf_pmu__new_format(struct list_head *list, char *name,
 			 int config, unsigned long *bits);
 void perf_pmu__set_format(unsigned long *bits, long from, long to);
diff --git a/tools/lib/perf/pmu-hybrid.c b/tools/lib/perf/pmu-hybrid.c
new file mode 100644
index 000000000000..ffc214e77236
--- /dev/null
+++ b/tools/lib/perf/pmu-hybrid.c
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/list.h>
+#include <linux/compiler.h>
+#include <linux/string.h>
+#include <linux/zalloc.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <stdarg.h>
+#include <locale.h>
+#include <api/fs/fs.h>
+#include <internal/pmu-hybrid.h>
+
+LIST_HEAD(perf_pmu__hybrid_pmus);
+
+bool perf_pmu__hybrid_mounted(const char *name)
+{
+	char path[PATH_MAX];
+	const char *sysfs;
+	FILE *file;
+	int n, cpu;
+
+	if (strncmp(name, "cpu_", 4))
+		return false;
+
+	sysfs = sysfs__mountpoint();
+	if (!sysfs)
+		return false;
+
+	snprintf(path, PATH_MAX, CPUS_TEMPLATE_CPU, sysfs, name);
+	if (!file_available(path))
+		return false;
+
+	file = fopen(path, "r");
+	if (!file)
+		return false;
+
+	n = fscanf(file, "%u", &cpu);
+	fclose(file);
+	if (n <= 0)
+		return false;
+
+	return true;
+}
+
+struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name)
+{
+	struct perf_pmu *pmu;
+
+	if (!name)
+		return NULL;
+
+	perf_pmu__for_each_hybrid_pmu(pmu) {
+		if (!strcmp(name, pmu->name))
+			return pmu;
+	}
+
+	return NULL;
+}
+
+bool perf_pmu__is_hybrid(const char *name)
+{
+	return perf_pmu__find_hybrid_pmu(name) != NULL;
+}
+
+char *perf_pmu__hybrid_type_to_pmu(const char *type)
+{
+	char *pmu_name = NULL;
+
+	if (asprintf(&pmu_name, "cpu_%s", type) < 0)
+		return NULL;
+
+	if (perf_pmu__is_hybrid(pmu_name))
+		return pmu_name;
+
+	/*
+	 * pmu may be not scanned, check the sysfs.
+	 */
+	if (perf_pmu__hybrid_mounted(pmu_name))
+		return pmu_name;
+
+	free(pmu_name);
+	return NULL;
+}
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index a192014fa52b..9fe90eeb2730 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -43,7 +43,7 @@
 #include "ui/progress.h"
 #include "../perf.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 
 struct c2c_hists {
 	struct hists		hists;
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 468958154ed9..bf62760edbb9 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -12,7 +12,7 @@
 
 #include "util/parse-events.h"
 #include "util/pmu.h"
-#include "util/pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "util/debug.h"
 #include "util/metricgroup.h"
 #include <subcmd/pager.h>
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index fcf65a59bea2..49fc462b6d65 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -19,7 +19,7 @@
 #include "util/map.h"
 #include "util/symbol.h"
 #include "util/pmu.h"
-#include "util/pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include <linux/err.h>
 
 #define MEM_OPERATION_LOAD	0x1
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 78185c982ebf..0f7440351842 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -47,7 +47,7 @@
 #include "util/util.h"
 #include "util/pfm.h"
 #include "util/clockid.h"
-#include "util/pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "util/evlist-hybrid.h"
 #include "asm/bug.h"
 #include "perf.h"
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f0ecfda34ece..4157faf03b2e 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -70,7 +70,7 @@
 #include "util/pfm.h"
 #include "util/bpf_counter.h"
 #include "util/iostat.h"
-#include "util/pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "asm/bug.h"
 
 #include <linux/time64.h>
diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c
index 4e09f0a312af..c421e8137d74 100644
--- a/tools/perf/tests/evsel-roundtrip-name.c
+++ b/tools/perf/tests/evsel-roundtrip-name.c
@@ -5,7 +5,7 @@
 #include "tests.h"
 #include "debug.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include <errno.h>
 #include <linux/kernel.h>
 
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 69381fe1655d..d39aaeeaad0f 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -6,7 +6,7 @@
 #include "tests.h"
 #include "debug.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include <dirent.h>
 #include <errno.h>
 #include <sys/types.h>
diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c
index 7c56bc1f4cff..82b23eb6e1f7 100644
--- a/tools/perf/tests/perf-time-to-tsc.c
+++ b/tools/perf/tests/perf-time-to-tsc.c
@@ -21,7 +21,7 @@
 #include "mmap.h"
 #include "tests.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 
 #define CHECK__(x) {				\
 	while ((x) < 0) {			\
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index b93828aacc27..1d697cecf4ea 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -69,7 +69,6 @@ perf-y += trace-event-parse.o
 perf-y += parse-events-flex.o
 perf-y += parse-events-bison.o
 perf-y += pmu.o
-perf-y += pmu-hybrid.o
 perf-y += trace-event-read.o
 perf-y += trace-event-info.o
 perf-y += trace-event-scripting.o
diff --git a/tools/perf/util/cputopo.c b/tools/perf/util/cputopo.c
index ec77e2a7b3ca..2520d2549d9e 100644
--- a/tools/perf/util/cputopo.c
+++ b/tools/perf/util/cputopo.c
@@ -7,12 +7,12 @@
 #include <api/fs/fs.h>
 #include <linux/zalloc.h>
 #include <perf/cpumap.h>
+#include <internal/pmu-hybrid.h>
 
 #include "cputopo.h"
 #include "cpumap.h"
 #include "debug.h"
 #include "env.h"
-#include "pmu-hybrid.h"
 
 #define CORE_SIB_FMT \
 	"%s/devices/system/cpu/cpu%d/topology/core_siblings_list"
diff --git a/tools/perf/util/evlist-hybrid.c b/tools/perf/util/evlist-hybrid.c
index 7c554234b43d..67c53acfaa29 100644
--- a/tools/perf/util/evlist-hybrid.c
+++ b/tools/perf/util/evlist-hybrid.c
@@ -5,9 +5,10 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "../perf.h"
-#include "util/pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "util/evlist-hybrid.h"
 #include "debug.h"
+#include "pmu.h"
 #include <unistd.h>
 #include <stdlib.h>
 #include <linux/err.h>
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 2cfc2935d1d2..d1e580c88be7 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -47,11 +47,11 @@
 #include "memswap.h"
 #include "util.h"
 #include "hashmap.h"
-#include "pmu-hybrid.h"
 #include "../perf-sys.h"
 #include "util/parse-branch-options.h"
 #include <internal/xyarray.h>
 #include <internal/lib.h>
+#include <internal/pmu-hybrid.h>
 
 #include <linux/ctype.h>
 
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 1c7414f66655..971ae4744895 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -49,10 +49,10 @@
 #include "cputopo.h"
 #include "bpf-event.h"
 #include "clockid.h"
-#include "pmu-hybrid.h"
 
 #include <linux/ctype.h>
 #include <internal/lib.h>
+#include <internal/pmu-hybrid.h>
 
 /*
  * magic2 = "PERFILE2"
diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
index f0e75df72b80..fb5f51432335 100644
--- a/tools/perf/util/mem-events.c
+++ b/tools/perf/util/mem-events.c
@@ -13,7 +13,7 @@
 #include "debug.h"
 #include "symbol.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 
 unsigned int perf_mem_events__loads_ldlat = 30;
 
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 4917e9704765..4a533740c939 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -11,7 +11,7 @@
 #include "evsel.h"
 #include "strbuf.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "expr.h"
 #include "rblist.h"
 #include <string.h>
diff --git a/tools/perf/util/parse-events-hybrid.c b/tools/perf/util/parse-events-hybrid.c
index 9fc86971027b..de901e74ce3d 100644
--- a/tools/perf/util/parse-events-hybrid.c
+++ b/tools/perf/util/parse-events-hybrid.c
@@ -12,7 +12,7 @@
 #include "parse-events-hybrid.h"
 #include "debug.h"
 #include "pmu.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "perf.h"
 
 static void config_hybrid_attr(struct perf_event_attr *attr,
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 278199ed788b..84c4ef32034b 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -36,7 +36,7 @@
 #include "util/event.h"
 #include "util/pfm.h"
 #include "util/parse-events-hybrid.h"
-#include "util/pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "perf.h"
 
 #define MAX_NAME_LEN 100
diff --git a/tools/perf/util/pmu-hybrid.c b/tools/perf/util/pmu-hybrid.c
deleted file mode 100644
index 65fdce81a384..000000000000
--- a/tools/perf/util/pmu-hybrid.c
+++ /dev/null
@@ -1,88 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/list.h>
-#include <linux/compiler.h>
-#include <linux/string.h>
-#include <linux/zalloc.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <stdarg.h>
-#include <locale.h>
-#include <api/fs/fs.h>
-#include "pmu-hybrid.h"
-
-LIST_HEAD(perf_pmu__hybrid_pmus);
-
-bool perf_pmu__hybrid_mounted(const char *name)
-{
-	char path[PATH_MAX];
-	const char *sysfs;
-	FILE *file;
-	int n, cpu;
-
-	if (strncmp(name, "cpu_", 4))
-		return false;
-
-	sysfs = sysfs__mountpoint();
-	if (!sysfs)
-		return false;
-
-	snprintf(path, PATH_MAX, CPUS_TEMPLATE_CPU, sysfs, name);
-	if (!file_available(path))
-		return false;
-
-	file = fopen(path, "r");
-	if (!file)
-		return false;
-
-	n = fscanf(file, "%u", &cpu);
-	fclose(file);
-	if (n <= 0)
-		return false;
-
-	return true;
-}
-
-struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name)
-{
-	struct perf_pmu *pmu;
-
-	if (!name)
-		return NULL;
-
-	perf_pmu__for_each_hybrid_pmu(pmu) {
-		if (!strcmp(name, pmu->name))
-			return pmu;
-	}
-
-	return NULL;
-}
-
-bool perf_pmu__is_hybrid(const char *name)
-{
-	return perf_pmu__find_hybrid_pmu(name) != NULL;
-}
-
-char *perf_pmu__hybrid_type_to_pmu(const char *type)
-{
-	char *pmu_name = NULL;
-
-	if (asprintf(&pmu_name, "cpu_%s", type) < 0)
-		return NULL;
-
-	if (perf_pmu__is_hybrid(pmu_name))
-		return pmu_name;
-
-	/*
-	 * pmu may be not scanned, check the sysfs.
-	 */
-	if (perf_pmu__hybrid_mounted(pmu_name))
-		return pmu_name;
-
-	free(pmu_name);
-	return NULL;
-}
diff --git a/tools/perf/util/pmu-hybrid.h b/tools/perf/util/pmu-hybrid.h
deleted file mode 100644
index 2b186c26a43e..000000000000
--- a/tools/perf/util/pmu-hybrid.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __PMU_HYBRID_H
-#define __PMU_HYBRID_H
-
-#include <linux/perf_event.h>
-#include <linux/compiler.h>
-#include <linux/list.h>
-#include <stdbool.h>
-#include "pmu.h"
-
-extern struct list_head perf_pmu__hybrid_pmus;
-
-#define perf_pmu__for_each_hybrid_pmu(pmu)	\
-	list_for_each_entry(pmu, &perf_pmu__hybrid_pmus, hybrid_list)
-
-bool perf_pmu__hybrid_mounted(const char *name);
-
-struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name);
-bool perf_pmu__is_hybrid(const char *name);
-char *perf_pmu__hybrid_type_to_pmu(const char *type);
-
-static inline int perf_pmu__hybrid_pmu_num(void)
-{
-	struct perf_pmu *pmu;
-	int num = 0;
-
-	perf_pmu__for_each_hybrid_pmu(pmu)
-		num++;
-
-	return num;
-}
-
-#endif /* __PMU_HYBRID_H */
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 13e1835955e0..5bda7796f91a 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -26,7 +26,7 @@
 #include "header.h"
 #include "string2.h"
 #include "strbuf.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 
 struct perf_pmu perf_pmu__fake;
 
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 3127c877e043..091f49a655f8 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -19,33 +19,6 @@ struct perf_cpu_map;
 #define CPUS_TEMPLATE_CPU	"%s/bus/event_source/devices/%s/cpus"
 #define MAX_PMU_NAME_LEN 128
 
-struct perf_event_attr;
-
-struct perf_pmu_caps {
-	char *name;
-	char *value;
-	struct list_head list;
-};
-
-struct perf_pmu {
-	char *name;
-	char *alias_name;
-	char *id;
-	__u32 type;
-	bool selectable;
-	bool is_uncore;
-	bool is_hybrid;
-	bool auxtrace;
-	int max_precise;
-	struct perf_event_attr *default_config;
-	struct perf_cpu_map *cpus;
-	struct list_head format;  /* HEAD struct perf_pmu_format -> list */
-	struct list_head aliases; /* HEAD struct perf_pmu_alias -> list */
-	struct list_head caps;    /* HEAD struct perf_pmu_caps -> list */
-	struct list_head list;    /* ELEM */
-	struct list_head hybrid_list;
-};
-
 extern struct perf_pmu perf_pmu__fake;
 
 struct perf_pmu_info {
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index 992a76c2af01..d36348c4d788 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -38,4 +38,3 @@ util/units.c
 util/affinity.c
 util/rwsem.c
 util/hashmap.c
-util/pmu-hybrid.c
diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index 588601000f3f..e3ffc084cb09 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -18,8 +18,9 @@
 #include <api/fs/fs.h>
 #include "util.h"
 #include "iostat.h"
-#include "pmu-hybrid.h"
+#include <internal/pmu-hybrid.h>
 #include "evlist-hybrid.h"
+#include "pmu.h"
 
 #define CNTR_NOT_SUPPORTED	"<not supported>"
 #define CNTR_NOT_COUNTED	"<not counted>"
-- 
2.31.1


  parent reply	other threads:[~2021-11-08 13:38 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 13:36 [RFC 00/59] libperf: Move in event parse code Jiri Olsa
2021-11-08 13:36 ` [PATCH 01/59] libperf: Move pmu-events.h file to libperf Jiri Olsa
2021-11-08 13:36 ` [PATCH 03/59] libperf: Move pmu-events build " Jiri Olsa
2021-11-08 13:36 ` [PATCH 04/59] libperf: Move perf_pmu__format_parse " Jiri Olsa
2021-11-08 13:36 ` [PATCH 05/59] tools api fs: Move in the fncache from perf Jiri Olsa
2021-11-08 17:46   ` Ian Rogers
2021-11-08 21:15     ` Jiri Olsa
2021-11-08 13:36 ` Jiri Olsa [this message]
2021-11-08 13:36 ` [PATCH 07/59] libperf: Move name to perf_evsel Jiri Olsa
2021-11-08 13:36 ` [PATCH 08/59] libperf: Move auto_merge_stats " Jiri Olsa
2021-11-08 13:36 ` [PATCH 09/59] libperf: Move config_terms " Jiri Olsa
2021-11-08 13:36 ` [PATCH 10/59] libperf: Move metric_id " Jiri Olsa
2021-11-08 13:36 ` [PATCH 11/59] libperf: Move tool_event " Jiri Olsa
2021-11-08 13:36 ` [PATCH 12/59] libperf: Move unit " Jiri Olsa
2021-11-08 13:36 ` [PATCH 13/59] libperf: Move exclude_GH " Jiri Olsa
2021-11-08 17:53   ` Ian Rogers
2021-11-08 21:16     ` Jiri Olsa
2021-11-08 13:36 ` [PATCH 14/59] libperf: Move sample_read " Jiri Olsa
2021-11-08 13:36 ` [PATCH 15/59] libperf: Move precise_max " Jiri Olsa
2021-11-08 13:36 ` [PATCH 16/59] libperf: Move weak_group " Jiri Olsa
2021-11-08 13:36 ` [PATCH 17/59] libperf: Move bpf_counter " Jiri Olsa
2021-11-08 13:36 ` [PATCH 18/59] libperf: Move group_name " Jiri Olsa
2021-11-08 17:58   ` Ian Rogers
2021-11-08 18:07     ` Arnaldo Carvalho de Melo
2021-11-08 21:19       ` Jiri Olsa
2021-11-08 13:36 ` [PATCH 19/59] perf tools: Fix parse_events_term__num call Jiri Olsa
2021-11-08 18:15   ` Ian Rogers
2021-11-08 21:21     ` Jiri Olsa
2021-11-08 13:36 ` [PATCH 20/59] perf tools: Pass parse_state all the way down to __add_event Jiri Olsa
2021-11-08 13:36 ` [PATCH 21/59] perf tools: Pass parse_state all the way down to add_tracepoint Jiri Olsa
2021-11-08 13:36 ` [PATCH 22/59] perf tools: Add evsel__new callback to parse_state_ops Jiri Olsa
2021-11-08 13:36 ` [PATCH 23/59] perf tools: Add evsel__new_tp " Jiri Olsa
2021-11-08 13:36 ` [PATCH 24/59] perf tools: Add loc_term and loc_val helpers to parse_events_term__str Jiri Olsa
2021-11-08 13:36 ` [PATCH 25/59] perf tools: Add loc_term and loc_val helpers to parse_events_term__num Jiri Olsa
2021-11-08 13:36 ` [PATCH 26/59] libperf: Move in the event_symbols_hw/event_symbols_sw Jiri Olsa
2021-11-08 13:36 ` [PATCH 27/59] libperf: Move in struct parse_events_term code Jiri Olsa
2021-11-08 13:36 ` [PATCH 28/59] perf tools: Add perf_evsel__add_event function Jiri Olsa
2021-11-08 13:36 ` [PATCH 29/59] perf tools: Change struct parse_events_state::evlist to perf_evlist Jiri Olsa
2021-11-08 13:36 ` [PATCH 30/59] libperf: Move in struct parse_events_state Jiri Olsa
2021-11-08 18:21   ` Ian Rogers
2021-11-08 21:24     ` Jiri Olsa
2021-11-08 13:36 ` [PATCH 31/59] perf tools: Move event_attr_init in evsel__new_idx function Jiri Olsa
2021-11-08 13:36 ` [PATCH 32/59] libperf: Move in perf_pmu__warn_invalid_config function Jiri Olsa
2021-11-08 13:36 ` [PATCH 33/59] libperf: Move in perf_evsel__add_event function Jiri Olsa
2021-11-08 13:36 ` [PATCH 34/59] perf tools: Move parse_events_update_lists to parser unit Jiri Olsa
2021-11-08 13:36 ` [PATCH 35/59] libperf: Add perf_evsel__is_group_leader function Jiri Olsa
2021-11-08 13:36 ` [PATCH 36/59] perf tools: Make parse_events__modifier_event work over perf_evsel Jiri Olsa
2021-11-08 13:36 ` [PATCH 37/59] perf tool: Pass perf_guest in struct parse_events_state Jiri Olsa
2021-11-08 13:36 ` [PATCH 38/59] libperf: Move in parse_events__modifier_group/event functions Jiri Olsa
2021-11-08 13:36 ` [PATCH 39/59] libperf: Move in parse_events__handle_error function Jiri Olsa
2021-11-08 13:36 ` [PATCH 40/59] libperf: Move in parse_events_evlist_error function Jiri Olsa
2021-11-08 13:36 ` [PATCH 41/59] perf tools: Add perf_evsel__delete callback to struct parse_events_ops Jiri Olsa
2021-11-08 13:36 ` [PATCH 42/59] libperf: Move in parse_events_name function Jiri Olsa
2021-11-08 18:23   ` Ian Rogers
2021-11-08 21:24     ` Jiri Olsa
2021-11-08 13:36 ` [PATCH 43/59] perf tools: Move out parse_events_add_pmu fallback from parser code Jiri Olsa
2021-11-08 13:36 ` [PATCH 44/59] perf tools: Add add_pmu callback to struct parse_events_ops Jiri Olsa
2021-11-08 13:36 ` [PATCH 45/59] perf tools: Add add_pmu_multi " Jiri Olsa
2021-11-08 13:36 ` [PATCH 46/59] perf tools: Add add_numeric " Jiri Olsa
2021-11-08 18:27   ` Ian Rogers
2021-11-08 21:34     ` Jiri Olsa
2021-11-08 13:36 ` [PATCH 47/59] perf tools: Add add_cache " Jiri Olsa
2021-11-08 13:36 ` [PATCH 48/59] perf tools: Add add_breakpoint " Jiri Olsa
2021-11-08 13:37 ` [PATCH 49/59] perf tools: Add add_tracepoint " Jiri Olsa
2021-11-08 13:37 ` [PATCH 50/59] perf tools: Add add_bpf " Jiri Olsa
2021-11-08 13:37 ` [PATCH 51/59] perf tools: Add add_tool " Jiri Olsa
2021-11-08 13:37 ` [PATCH 52/59] perf tools: Add set_leader " Jiri Olsa
2021-11-08 13:37 ` [PATCH 53/59] perf tools: Add parse_check " Jiri Olsa
2021-11-08 13:37 ` [PATCH 54/59] perf tools: Move PE_* enums in parse_events__scanner Jiri Olsa
2021-11-08 13:37 ` [PATCH 55/59] libperf: Move in parse-events flex/bison parser Jiri Olsa
2021-11-08 13:37 ` [PATCH 56/59] libperf: Move in parse_events_add_breakpoint function Jiri Olsa
2021-11-08 13:37 ` [PATCH 57/59] libperf: Move in some lib objects from perf Jiri Olsa
2021-11-08 13:37 ` [PATCH 58/59] libperf: Add libperf_parse_events function Jiri Olsa
2021-11-08 13:37 ` [PATCH 59/59] libperf: Add parse-events test Jiri Olsa
2021-11-08 18:32   ` Ian Rogers
2021-11-08 21:37     ` Jiri Olsa
2021-11-08 18:50 ` [RFC 00/59] libperf: Move in event parse code Ian Rogers
2021-11-08 21:50   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211108133710.1352822-7-jolsa@kernel.org \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.