Skip to contentSkip to conversation

perf tools: Initial libperf separation

RFC In review Jiri Olsa 9 participants 192 messages Jul 21, 2019 – Aug 23, 2019 Page 1 of 5

Subsystems (9)
lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

cover perf tools: Initial libperf separation

hi,
we have long term goal to separate some of the perf functionality into library. This patchset is initial effort on separating some of the interface.

Currently only the basic counting interface is exported, it allows to:
- create cpu/threads maps
- create evlist/evsel objects
- add evsel objects into evlist
- open/close evlist/evsel objects
- enable/disable events
- read evsel counts

The initial effort was to have total separation of the objects from perf code, but it showed not to be a good way. The amount of changed code was too big with high chance for regressions, mainly because of the code embedding one of the above objects statically.

We took the other approach of sharing the objects/struct details within the perf and libperf code. This way we can keep perf functionality without any major changes and the libperf users are still separated from the object/struct details. We can move to total libperf's objects separation gradually in future.

You can check current interface/functionality in examples under:
tools/perf/lib/Documentation/tutorial

or check tests in here:

  $ cd tools/perf/lib && make tests
    LINK     test-cpumap-a
    LINK     test-threadmap-a
    LINK     test-evlist-a
    LINK     test-evsel-a
    LINK     test-cpumap-so
    LINK     test-threadmap-so
    LINK     test-evlist-so
    LINK     test-evsel-so
  running static:
  - running test-cpumap.c...OK
  - running test-threadmap.c...OK
  - running test-evlist.c...OK
  - running test-evsel.c...OK
  running dynamic:
  - running test-cpumap.c...OK
  - running test-threadmap.c...OK
  - running test-evlist.c...OK
  - running test-evsel.c...OK

The upcoming changes in the near future:
- move parse_events interface in, so we have the event parsing interface in the library together with the all events from tools/perf/pmu-events/arch
- add sampling interface with event mmap support and all the sampling events objects
- add user mmap interface to read counters
- more documentation and tutorial ;-)
- move under tools/lib after the interface is more stable-ish

Big kudos to BPF guys, because most of the infrastructure is 'borrowed' from libbpf library.. ;-)

It's also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/lib

I tested so far on x86, I still need to run it through s390/ppc/arm.

throughts? thanks,
jirka

Cc Daniel Borkmann <[email protected]>
Cc Alexei Starovoitov <[email protected]>
Cc Kan Liang <[email protected]>
Cc Song Liu <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Stephane Eranian <[email protected]>

---
Jiri Olsa (79):
perf tools: Move loaded out of struct perf_counts_values perf tools: Rename struct cpu_map to struct perf_cpu_map perf tools: Rename struct thread_map to struct perf_thread_map perf tools: Rename struct perf_evsel to struct evsel perf tools: Rename struct perf_evlist to struct evlist perf tools: Rename perf_evsel__init to evsel__init perf tools: Rename perf_evlist__init to evlist__init perf tools: Rename perf_evlist__new to evlist__new perf tools: Rename perf_evlist__delete to evlist__delete perf tools: Rename perf_evsel__delete to evsel__delete perf tools: Rename perf_evsel__new to evsel__new
perf tools: Rename perf_evlist__add to evlist__add perf tools: Rename perf_evlist__remove to evlist__remove perf tools: Rename perf_evsel__open to evsel__open perf tools: Rename perf_evsel__enable to evsel__enable perf tools: Rename perf_evsel__disable to evsel__disable perf tools: Rename perf_evsel__apply_filter to evsel__apply_filter perf tools: Rename perf_evsel__cpus to evsel__cpus perf tools: Rename perf_evlist__open to evlist__open perf tools: Rename perf_evlist__close to evlist__close perf tools: Rename perf_evlist__enable to evlist__enable perf tools: Rename perf_evlist__disable to evlist__disable
libperf: Make libperf.a part of the build
libperf: Add build version support
libperf: Add libperf in python.so compilation
libperf: Add perf/core.h header
libperf: Add debug output support
libperf: Add perf_cpu_map struct
libperf: Add perf_cpu_map__dummy_new function
libperf: Add perf_cpu_map__get/perf_cpu_map__put
libperf: Add perf_thread_map struct
libperf: Add perf_thread_map__new_dummy function
libperf: Add perf_thread_map__get/perf_thread_map__put
libperf: Add perf_evlist and perf_evsel structs
libperf: Include perf_evsel in evsel object
libperf: Include perf_evlist in evlist object
libperf: Add perf_evsel__init function
libperf: Add perf_evlist__init function
libperf: Add perf_evlist__add function
libperf: Add perf_evlist__remove function
libperf: Add nr_entries to perf_evlist
libperf: Add attr to perf_evsel
libperf: Add perf_cpu_map__new/perf_cpu_map__read functions
libperf: Move zalloc.o into libperf
libperf: Add perf_evlist__new function
libperf: Add perf_evsel__new function
libperf: Add perf_evlist__for_each_evsel macro
libperf: Add perf_evlist__delete function
libperf: Add perf_evsel__delete function
libperf: Add cpus to struct perf_evsel
libperf: Add own_cpus to struct perf_evsel
libperf: Add threads to struct perf_evsel
libperf: Add has_user_cpus to struct perf_evlist
libperf: Add cpus to struct perf_evlist
libperf: Add threads to struct perf_evlist
libperf: Add perf_evlist__set_maps function
libperf: Add xyarray object
libperf: Add fd array to struct perf_evsel
libperf: Add nr_members to struct perf_evsel
libperf: Add readn/writen function
libperf: Add perf_evsel__alloc_fd function
libperf: Add perf_evsel__open function
libperf: Add perf_evsel__close function
libperf: Add perf_evsel__read function
libperf: Add perf_evsel__enable/disable/apply_filter functions
libperf: Add perf_cpu_map__for_each_cpu macro
libperf: Add perf_evsel__cpus/threads functions
libperf: Add perf_evlist__open/close functions
libperf: Add perf_evlist__enable/disable functions
libperf: Add perf_evsel__attr functions
libperf: Add install targets
libperf: Add tests support
libperf: Add perf_cpu_map test
libperf: Add perf_thread_map test
libperf: Add perf_evlist test
libperf: Add perf_evsel tests
libperf: Add perf_evlist__enable/disable test
libperf: Add perf_evsel__enable/disable test
libperf: Initial documentation

 tools/perf/Makefile.config                         |    1 +
 tools/perf/Makefile.perf                           |   31 +-
 tools/perf/arch/arm/util/auxtrace.c                |    4 +-
 tools/perf/arch/arm/util/cs-etm.c                  |   26 +-
 tools/perf/arch/arm64/util/arm-spe.c               |    6 +-
 tools/perf/arch/powerpc/util/kvm-stat.c            |   12 +-
 tools/perf/arch/s390/util/auxtrace.c               |    8 +-
 tools/perf/arch/s390/util/kvm-stat.c               |    8 +-
 tools/perf/arch/x86/tests/intel-cqm.c              |    8 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c       |   30 +-
 tools/perf/arch/x86/util/auxtrace.c                |   10 +-
 tools/perf/arch/x86/util/intel-bts.c               |   38 +-
 tools/perf/arch/x86/util/intel-pt.c                |   82 +-
 tools/perf/arch/x86/util/kvm-stat.c                |   12 +-
 tools/perf/bench/epoll-ctl.c                       |    7 +-
 tools/perf/bench/epoll-wait.c                      |    7 +-
 tools/perf/bench/futex-hash.c                      |    5 +-
 tools/perf/bench/futex-lock-pi.c                   |    7 +-
 tools/perf/bench/futex-requeue.c                   |    7 +-
 tools/perf/bench/futex-wake-parallel.c             |    6 +-
 tools/perf/bench/futex-wake.c                      |    7 +-
 tools/perf/builtin-annotate.c                      |   16 +-
 tools/perf/builtin-c2c.c                           |   10 +-
 tools/perf/builtin-diff.c                          |   20 +-
 tools/perf/builtin-evlist.c                        |    4 +-
 tools/perf/builtin-ftrace.c                        |   18 +-
 tools/perf/builtin-inject.c                        |   60 +-
 tools/perf/builtin-kmem.c                          |   24 +-
 tools/perf/builtin-kvm.c                           |   46 +-
 tools/perf/builtin-lock.c                          |   30 +-
 tools/perf/builtin-mem.c                           |    2 +-
 tools/perf/builtin-record.c                        |   50 +-
 tools/perf/builtin-report.c                        |   32 +-
 tools/perf/builtin-sched.c                         |   96 +-
 tools/perf/builtin-script.c                        |  167 +--
 tools/perf/builtin-stat.c                          |  135 +--
 tools/perf/builtin-timechart.c                     |   46 +-
 tools/perf/builtin-top.c                           |   71 +-
 tools/perf/builtin-trace.c                         |  180 +--
 tools/perf/lib/Build                               |   12 +
 tools/perf/lib/Documentation/Makefile              |    7 +
 tools/perf/lib/Documentation/man/libperf.rst       |  102 ++
 tools/perf/lib/Documentation/tutorial/tutorial.rst |  123 ++
 tools/perf/lib/Makefile                            |  158 +++
 tools/perf/lib/core.c                              |   34 +
 tools/perf/lib/cpumap.c                            |  239 ++++
 tools/perf/lib/evlist.c                            |  159 +++
 tools/perf/lib/evsel.c                             |  232 ++++
 tools/perf/lib/include/internal/cpumap.h           |   17 +
 tools/perf/lib/include/internal/evlist.h           |   50 +
 tools/perf/lib/include/internal/evsel.h            |   29 +
 tools/perf/lib/include/internal/lib.h              |   10 +
 tools/perf/lib/include/internal/tests.h            |   19 +
 tools/perf/lib/include/internal/threadmap.h        |   23 +
 .../perf/{util => lib/include/internal}/xyarray.h  |    6 +-
 tools/perf/lib/include/perf/core.h                 |   22 +
 tools/perf/lib/include/perf/cpumap.h               |   23 +
 tools/perf/lib/include/perf/evlist.h               |   35 +
 tools/perf/lib/include/perf/evsel.h                |   39 +
 tools/perf/lib/include/perf/threadmap.h            |   18 +
 tools/perf/lib/internal.h                          |   18 +
 tools/perf/lib/lib.c                               |   46 +
 tools/perf/lib/libperf.map                         |   40 +
 tools/perf/lib/libperf.pc.template                 |   11 +
 tools/perf/lib/tests/Makefile                      |   38 +
 tools/perf/lib/tests/test-cpumap.c                 |   21 +
 tools/perf/lib/tests/test-evlist.c                 |  186 +++
 tools/perf/lib/tests/test-evsel.c                  |  125 ++
 tools/perf/lib/tests/test-threadmap.c              |   21 +
 tools/perf/lib/threadmap.c                         |   81 ++
 tools/perf/lib/xyarray.c                           |   33 +
 tools/perf/tests/backward-ring-buffer.c            |   18 +-
 tools/perf/tests/bitmap.c                          |    5 +-
 tools/perf/tests/bpf.c                             |   12 +-
 tools/perf/tests/code-reading.c                    |   50 +-
 tools/perf/tests/cpumap.c                          |   21 +-
 tools/perf/tests/event-times.c                     |   81 +-
 tools/perf/tests/event_update.c                    |   13 +-
 tools/perf/tests/evsel-roundtrip-name.c            |   12 +-
 tools/perf/tests/evsel-tp-sched.c                  |    8 +-
 tools/perf/tests/hists_cumulate.c                  |   18 +-
 tools/perf/tests/hists_filter.c                    |   10 +-
 tools/perf/tests/hists_link.c                      |   10 +-
 tools/perf/tests/hists_output.c                    |   20 +-
 tools/perf/tests/keep-tracking.c                   |   44 +-
 tools/perf/tests/mem2node.c                        |    5 +-
 tools/perf/tests/mmap-basic.c                      |   28 +-
 tools/perf/tests/mmap-thread-lookup.c              |    4 +-
 tools/perf/tests/openat-syscall-all-cpus.c         |   18 +-
 tools/perf/tests/openat-syscall-tp-fields.c        |   14 +-
 tools/perf/tests/openat-syscall.c                  |   10 +-
 tools/perf/tests/parse-events.c                    | 1220 ++++++++++----------
 tools/perf/tests/parse-no-sample-id-all.c          |    6 +-
 tools/perf/tests/perf-record.c                     |   10 +-
 tools/perf/tests/sample-parsing.c                  |    8 +-
 tools/perf/tests/sw-clock.c                        |   33 +-
 tools/perf/tests/switch-tracking.c                 |   64 +-
 tools/perf/tests/task-exit.c                       |   35 +-
 tools/perf/tests/thread-map.c                      |   28 +-
 tools/perf/tests/time-utils-test.c                 |    2 +-
 tools/perf/tests/topology.c                        |    9 +-
 tools/perf/ui/browsers/annotate.c                  |   16 +-
 tools/perf/ui/browsers/hists.c                     |   54 +-
 tools/perf/ui/browsers/res_sample.c                |    4 +-
 tools/perf/ui/browsers/scripts.c                   |    6 +-
 tools/perf/ui/gtk/annotate.c                       |    8 +-
 tools/perf/ui/gtk/gtk.h                            |    8 +-
 tools/perf/ui/gtk/hists.c                          |    6 +-
 tools/perf/ui/hist.c                               |   16 +-
 tools/perf/util/Build                              |    6 -
 tools/perf/util/annotate.c                         |   42 +-
 tools/perf/util/annotate.h                         |   26 +-
 tools/perf/util/auxtrace.c                         |   28 +-
 tools/perf/util/auxtrace.h                         |   24 +-
 tools/perf/util/bpf-event.c                        |    2 +-
 tools/perf/util/bpf-event.h                        |    4 +-
 tools/perf/util/bpf-loader.c                       |   34 +-
 tools/perf/util/bpf-loader.h                       |   28 +-
 tools/perf/util/build-id.c                         |    2 +-
 tools/perf/util/build-id.h                         |    2 +-
 tools/perf/util/callchain.c                        |    2 +-
 tools/perf/util/callchain.h                        |    2 +-
 tools/perf/util/cgroup.c                           |   22 +-
 tools/perf/util/cgroup.h                           |    6 +-
 tools/perf/util/counts.c                           |   17 +-
 tools/perf/util/counts.h                           |   34 +-
 tools/perf/util/cpumap.c                           |  264 +----
 tools/perf/util/cpumap.h                           |   54 +-
 tools/perf/util/cputopo.c                          |   13 +-
 tools/perf/util/cs-etm.c                           |    4 +-
 tools/perf/util/data-convert-bt.c                  |   38 +-
 tools/perf/util/db-export.c                        |   10 +-
 tools/perf/util/db-export.h                        |   10 +-
 tools/perf/util/env.c                              |    2 +-
 tools/perf/util/env.h                              |    2 +-
 tools/perf/util/event.c                            |   30 +-
 tools/perf/util/event.h                            |   14 +-
 tools/perf/util/evlist.c                           |  607 +++++-----
 tools/perf/util/evlist.h                           |  215 ++--
 tools/perf/util/evsel.c                            |  496 ++++----
 tools/perf/util/evsel.h                            |  194 ++--
 tools/perf/util/evsel_fprintf.c                    |   16 +-
 tools/perf/util/header.c                           |  225 ++--
 tools/perf/util/header.h                           |   24 +-
 tools/perf/util/hist.c                             |   32 +-
 tools/perf/util/hist.h                             |   38 +-
 tools/perf/util/intel-bts.c                        |   22 +-
 tools/perf/util/intel-pt.c                         |   94 +-
 tools/perf/util/jitdump.c                          |    8 +-
 tools/perf/util/kvm-stat.h                         |   22 +-
 tools/perf/util/machine.c                          |   12 +-
 tools/perf/util/machine.h                          |    8 +-
 tools/perf/util/map.h                              |    2 +-
 tools/perf/util/metricgroup.c                      |   26 +-
 tools/perf/util/metricgroup.h                      |    6 +-
 tools/perf/util/mmap.c                             |    4 +-
 tools/perf/util/parse-events.c                     |  143 +--
 tools/perf/util/parse-events.h                     |    8 +-
 tools/perf/util/pmu.c                              |   15 +-
 tools/perf/util/pmu.h                              |    2 +-
 tools/perf/util/python-ext-sources                 |    2 -
 tools/perf/util/python.c                           |   73 +-
 tools/perf/util/record.c                           |   73 +-
 tools/perf/util/s390-cpumsf.c                      |    4 +-
 tools/perf/util/s390-sample-raw.c                  |    6 +-
 tools/perf/util/sample-raw.c                       |    2 +-
 tools/perf/util/sample-raw.h                       |    6 +-
 .../perf/util/scripting-engines/trace-event-perl.c |   14 +-
 .../util/scripting-engines/trace-event-python.c    |   40 +-
 tools/perf/util/session.c                          |   81 +-
 tools/perf/util/session.h                          |   12 +-
 tools/perf/util/setup.py                           |    3 +-
 tools/perf/util/sort.c                             |   60 +-
 tools/perf/util/sort.h                             |    6 +-
 tools/perf/util/stat-display.c                     |  112 +-
 tools/perf/util/stat-shadow.c                      |   70 +-
 tools/perf/util/stat.c                             |   64 +-
 tools/perf/util/stat.h                             |   35 +-
 tools/perf/util/svghelper.c                        |    7 +-
 tools/perf/util/thread_map.c                       |  131 +--
 tools/perf/util/thread_map.h                       |   58 +-
 tools/perf/util/tool.h                             |    8 +-
 tools/perf/util/top.c                              |   12 +-
 tools/perf/util/top.h                              |    8 +-
 tools/perf/util/trace-event-info.c                 |   14 +-
 tools/perf/util/trace-event-scripting.c            |    2 +-
 tools/perf/util/trace-event.h                      |    4 +-
 tools/perf/util/util.c                             |   40 -
 tools/perf/util/util.h                             |    4 +-
 189 files changed, 5313 insertions(+), 3819 deletions(-)
 create mode 100644 tools/perf/lib/Build
 create mode 100644 tools/perf/lib/Documentation/Makefile
 create mode 100644 tools/perf/lib/Documentation/man/libperf.rst
 create mode 100644 tools/perf/lib/Documentation/tutorial/tutorial.rst
 create mode 100644 tools/perf/lib/Makefile
 create mode 100644 tools/perf/lib/core.c
 create mode 100644 tools/perf/lib/cpumap.c
 create mode 100644 tools/perf/lib/evlist.c
 create mode 100644 tools/perf/lib/evsel.c
 create mode 100644 tools/perf/lib/include/internal/cpumap.h
 create mode 100644 tools/perf/lib/include/internal/evlist.h
 create mode 100644 tools/perf/lib/include/internal/evsel.h
 create mode 100644 tools/perf/lib/include/internal/lib.h
 create mode 100644 tools/perf/lib/include/internal/tests.h
 create mode 100644 tools/perf/lib/include/internal/threadmap.h
 rename tools/perf/{util => lib/include/internal}/xyarray.h (84%)
 create mode 100644 tools/perf/lib/include/perf/core.h
 create mode 100644 tools/perf/lib/include/perf/cpumap.h
 create mode 100644 tools/perf/lib/include/perf/evlist.h
 create mode 100644 tools/perf/lib/include/perf/evsel.h
 create mode 100644 tools/perf/lib/include/perf/threadmap.h
 create mode 100644 tools/perf/lib/internal.h
 create mode 100644 tools/perf/lib/lib.c
 create mode 100644 tools/perf/lib/libperf.map
 create mode 100644 tools/perf/lib/libperf.pc.template
 create mode 100644 tools/perf/lib/tests/Makefile
 create mode 100644 tools/perf/lib/tests/test-cpumap.c
 create mode 100644 tools/perf/lib/tests/test-evlist.c
 create mode 100644 tools/perf/lib/tests/test-evsel.c
 create mode 100644 tools/perf/lib/tests/test-threadmap.c
 create mode 100644 tools/perf/lib/threadmap.c
 create mode 100644 tools/perf/lib/xyarray.c
author reviewer
#1 lore raw

PATCH 1/79 perf tools: Move loaded out of struct perf_counts_values

Because we will make struct perf_counts_values public in following patches and 'loaded' is implementation related.

No functional change is expected.

---
 tools/perf/builtin-stat.c |  4 ++--
 tools/perf/util/counts.c  | 11 +++++++++++
 tools/perf/util/counts.h  | 14 +++++++++++++-
 tools/perf/util/evsel.c   |  3 ++-
 4 files changed, 28 insertions(+), 4 deletions(-)
tools/perf/builtin-stat.c +2 -2
index 352cf39d7c2f..7b9c26f9cf34 100644
@@ -287,7 +287,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
 			 * The leader's group read loads data into its group members
 			 * (via perf_evsel__read_counter) and sets threir count->loaded.
 			 */
-			if (!count->loaded &&
+			if (!perf_counts__is_loaded(counter->counts, cpu, thread) &&
 			    read_single_counter(counter, cpu, thread, rs)) {
 				counter->counts->scaled = -1;
 				perf_counts(counter->counts, cpu, thread)->ena = 0;
@@ -295,7 +295,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
 				return -1;
 			}
 
-			count->loaded = false;
+			perf_counts__set_loaded(counter->counts, cpu, thread, false);
 
 			if (STAT_RECORD) {
 				if (perf_evsel__write_stat_event(counter, cpu, thread, count)) {
tools/perf/util/counts.c +11 -0
index 88be9c4365e0..01ee81df3fe5 100644
@@ -19,6 +19,15 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads)
 		}
 
 		counts->values = values;
+
+		values = xyarray__new(ncpus, nthreads, sizeof(bool));
+		if (!values) {
+			xyarray__delete(counts->values);
+			free(counts);
+			return NULL;
+		}
+
+		counts->loaded = values;
 	}
 
 	return counts;
@@ -27,6 +36,7 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads)
 void perf_counts__delete(struct perf_counts *counts)
 {
 	if (counts) {
+		xyarray__delete(counts->loaded);
 		xyarray__delete(counts->values);
 		free(counts);
 	}
@@ -34,6 +44,7 @@ void perf_counts__delete(struct perf_counts *counts)
 
 static void perf_counts__reset(struct perf_counts *counts)
 {
+	xyarray__reset(counts->loaded);
 	xyarray__reset(counts->values);
 }
 
tools/perf/util/counts.h +13 -1
index 0d1050ccc586..460b56ce3252 100644
@@ -13,13 +13,13 @@ struct perf_counts_values {
 		};
 		u64 values[3];
 	};
-	bool	loaded;
 };
 
 struct perf_counts {
 	s8			  scaled;
 	struct perf_counts_values aggr;
 	struct xyarray		  *values;
+	struct xyarray		  *loaded;
 };
 
 
@@ -29,6 +29,18 @@ perf_counts(struct perf_counts *counts, int cpu, int thread)
 	return xyarray__entry(counts->values, cpu, thread);
 }
 
+static inline bool
+perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread)
+{
+	return *((bool *) xyarray__entry(counts->loaded, cpu, thread));
+}
+
+static inline void
+perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded)
+{
+	*((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded;
+}
+
 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
 void perf_counts__delete(struct perf_counts *counts);
 
tools/perf/util/evsel.c +2 -1
index 7d1757a2ec46..d23b9574f793 100644
@@ -1439,7 +1439,8 @@ perf_evsel__set_count(struct perf_evsel *counter, int cpu, int thread,
 	count->val    = val;
 	count->ena    = ena;
 	count->run    = run;
-	count->loaded = true;
+
+	perf_counts__set_loaded(counter->counts, cpu, thread, true);
 }
 
 static int
Signature · 1 line
2.21.0
#2 lore raw

[tip:perf/core] perf stat: Move loaded out of struct perf_counts_values

perf stat: Move loaded out of struct perf_counts_values
Commit-ID:  df1d6856eaa7ec9ad1e670685b370f3e66326079
Gitweb:     https://git.kernel.org/tip/df1d6856eaa7ec9ad1e670685b370f3e66326079
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:48 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf stat: Move loaded out of struct perf_counts_values

Because we will make struct perf_counts_values public in following patches and 'loaded' is implementation related.

No functional change is expected.

---
 tools/perf/builtin-stat.c |  4 ++--
 tools/perf/util/counts.c  | 11 +++++++++++
 tools/perf/util/counts.h  | 14 +++++++++++++-
 tools/perf/util/evsel.c   |  3 ++-
 4 files changed, 28 insertions(+), 4 deletions(-)
tools/perf/builtin-stat.c +2 -2
index 352cf39d7c2f..7b9c26f9cf34 100644
@@ -287,7 +287,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
 			 * The leader's group read loads data into its group members
 			 * (via perf_evsel__read_counter) and sets threir count->loaded.
 			 */
-			if (!count->loaded &&
+			if (!perf_counts__is_loaded(counter->counts, cpu, thread) &&
 			    read_single_counter(counter, cpu, thread, rs)) {
 				counter->counts->scaled = -1;
 				perf_counts(counter->counts, cpu, thread)->ena = 0;
@@ -295,7 +295,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
 				return -1;
 			}
 
-			count->loaded = false;
+			perf_counts__set_loaded(counter->counts, cpu, thread, false);
 
 			if (STAT_RECORD) {
 				if (perf_evsel__write_stat_event(counter, cpu, thread, count)) {
tools/perf/util/counts.c +11 -0
index 88be9c4365e0..01ee81df3fe5 100644
@@ -19,6 +19,15 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads)
 		}
 
 		counts->values = values;
+
+		values = xyarray__new(ncpus, nthreads, sizeof(bool));
+		if (!values) {
+			xyarray__delete(counts->values);
+			free(counts);
+			return NULL;
+		}
+
+		counts->loaded = values;
 	}
 
 	return counts;
@@ -27,6 +36,7 @@ struct perf_counts *perf_counts__new(int ncpus, int nthreads)
 void perf_counts__delete(struct perf_counts *counts)
 {
 	if (counts) {
+		xyarray__delete(counts->loaded);
 		xyarray__delete(counts->values);
 		free(counts);
 	}
@@ -34,6 +44,7 @@ void perf_counts__delete(struct perf_counts *counts)
 
 static void perf_counts__reset(struct perf_counts *counts)
 {
+	xyarray__reset(counts->loaded);
 	xyarray__reset(counts->values);
 }
 
tools/perf/util/counts.h +13 -1
index 0d1050ccc586..460b56ce3252 100644
@@ -13,13 +13,13 @@ struct perf_counts_values {
 		};
 		u64 values[3];
 	};
-	bool	loaded;
 };
 
 struct perf_counts {
 	s8			  scaled;
 	struct perf_counts_values aggr;
 	struct xyarray		  *values;
+	struct xyarray		  *loaded;
 };
 
 
@@ -29,6 +29,18 @@ perf_counts(struct perf_counts *counts, int cpu, int thread)
 	return xyarray__entry(counts->values, cpu, thread);
 }
 
+static inline bool
+perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread)
+{
+	return *((bool *) xyarray__entry(counts->loaded, cpu, thread));
+}
+
+static inline void
+perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded)
+{
+	*((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded;
+}
+
 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
 void perf_counts__delete(struct perf_counts *counts);
 
tools/perf/util/evsel.c +2 -1
index 7d1757a2ec46..d23b9574f793 100644
@@ -1439,7 +1439,8 @@ perf_evsel__set_count(struct perf_evsel *counter, int cpu, int thread,
 	count->val    = val;
 	count->ena    = ena;
 	count->run    = run;
-	count->loaded = true;
+
+	perf_counts__set_loaded(counter->counts, cpu, thread, true);
 }
 
 static int
author reviewer
#3 lore raw

PATCH 2/79 perf tools: Rename struct cpu_map to struct perf_cpu_map

In reply to Jiri Olsa

Renaming struct cpu_map to struct perf_cpu_map,
so it could be part of libperf.

---
 tools/perf/arch/x86/tests/perf-time-to-tsc.c  |  2 +-
 tools/perf/arch/x86/util/intel-bts.c          |  2 +-
 tools/perf/arch/x86/util/intel-pt.c           |  2 +-
 tools/perf/bench/epoll-ctl.c                  |  4 +-
 tools/perf/bench/epoll-wait.c                 |  4 +-
 tools/perf/bench/futex-hash.c                 |  2 +-
 tools/perf/bench/futex-lock-pi.c              |  4 +-
 tools/perf/bench/futex-requeue.c              |  4 +-
 tools/perf/bench/futex-wake-parallel.c        |  4 +-
 tools/perf/bench/futex-wake.c                 |  4 +-
 tools/perf/builtin-c2c.c                      |  2 +-
 tools/perf/builtin-ftrace.c                   |  6 +-
 tools/perf/builtin-sched.c                    |  8 +-
 tools/perf/builtin-script.c                   |  2 +-
 tools/perf/builtin-stat.c                     | 46 +++++------
 tools/perf/tests/bitmap.c                     |  2 +-
 tools/perf/tests/code-reading.c               |  2 +-
 tools/perf/tests/cpumap.c                     |  8 +-
 tools/perf/tests/event-times.c                |  4 +-
 tools/perf/tests/event_update.c               |  2 +-
 tools/perf/tests/keep-tracking.c              |  2 +-
 tools/perf/tests/mem2node.c                   |  2 +-
 tools/perf/tests/mmap-basic.c                 |  2 +-
 tools/perf/tests/openat-syscall-all-cpus.c    |  2 +-
 tools/perf/tests/sw-clock.c                   |  2 +-
 tools/perf/tests/switch-tracking.c            |  2 +-
 tools/perf/tests/task-exit.c                  |  2 +-
 tools/perf/tests/topology.c                   |  4 +-
 tools/perf/util/cpumap.c                      | 78 +++++++++----------
 tools/perf/util/cpumap.h                      | 52 ++++++-------
 tools/perf/util/cputopo.c                     |  4 +-
 tools/perf/util/env.h                         |  2 +-
 tools/perf/util/event.c                       | 18 ++---
 tools/perf/util/event.h                       |  8 +-
 tools/perf/util/evlist.c                      | 10 +--
 tools/perf/util/evlist.h                      |  8 +-
 tools/perf/util/evsel.c                       |  8 +-
 tools/perf/util/evsel.h                       | 12 +--
 tools/perf/util/header.c                      |  4 +-
 tools/perf/util/mmap.c                        |  2 +-
 tools/perf/util/parse-events.c                |  2 +-
 tools/perf/util/pmu.c                         | 10 +--
 tools/perf/util/pmu.h                         |  2 +-
 tools/perf/util/python.c                      |  6 +-
 tools/perf/util/record.c                      |  6 +-
 .../scripting-engines/trace-event-python.c    |  2 +-
 tools/perf/util/session.c                     |  2 +-
 tools/perf/util/stat.c                        |  2 +-
 tools/perf/util/stat.h                        |  6 +-
 tools/perf/util/svghelper.c                   |  2 +-
 50 files changed, 189 insertions(+), 189 deletions(-)
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index 7a7721604b86..4676fd967dc6 100644
@@ -50,7 +50,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 		.sample_time	     = true,
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
 	int err = -1, ret, i;
tools/perf/arch/x86/util/intel-bts.c +1 -1
index ec5c1bb84095..da1583d27efd 100644
@@ -106,7 +106,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
 			container_of(itr, struct intel_bts_recording, itr);
 	struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu;
 	struct perf_evsel *evsel, *intel_bts_evsel = NULL;
-	const struct cpu_map *cpus = evlist->cpus;
+	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 
 	btsr->evlist = evlist;
tools/perf/arch/x86/util/intel-pt.c +1 -1
index 609088c01e3a..69a23e40abc9 100644
@@ -557,7 +557,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 	struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu;
 	bool have_timing_info, need_immediate = false;
 	struct perf_evsel *evsel, *intel_pt_evsel = NULL;
-	const struct cpu_map *cpus = evlist->cpus;
+	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 	u64 tsc_bit;
 	int err;
tools/perf/bench/epoll-ctl.c +2 -2
index 2af067859966..1fd724f1d48b 100644
@@ -219,7 +219,7 @@ static void init_fdmaps(struct worker *w, int pct)
 	}
 }
 
-static int do_threads(struct worker *worker, struct cpu_map *cpu)
+static int do_threads(struct worker *worker, struct perf_cpu_map *cpu)
 {
 	pthread_attr_t thread_attr, *attrp = NULL;
 	cpu_set_t cpuset;
@@ -301,7 +301,7 @@ int bench_epoll_ctl(int argc, const char **argv)
 	int j, ret = 0;
 	struct sigaction act;
 	struct worker *worker = NULL;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 	struct rlimit rl, prevrl;
 	unsigned int i;
 
tools/perf/bench/epoll-wait.c +2 -2
index fe85448abd45..79a254fff2d1 100644
@@ -288,7 +288,7 @@ static void print_summary(void)
 	       (int) runtime.tv_sec);
 }
 
-static int do_threads(struct worker *worker, struct cpu_map *cpu)
+static int do_threads(struct worker *worker, struct perf_cpu_map *cpu)
 {
 	pthread_attr_t thread_attr, *attrp = NULL;
 	cpu_set_t cpuset;
@@ -415,7 +415,7 @@ int bench_epoll_wait(int argc, const char **argv)
 	struct sigaction act;
 	unsigned int i;
 	struct worker *worker = NULL;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 	pthread_t wthread;
 	struct rlimit rl, prevrl;
 
tools/perf/bench/futex-hash.c +1 -1
index a80797763e1f..b4fea8e3a368 100644
@@ -124,7 +124,7 @@ int bench_futex_hash(int argc, const char **argv)
 	unsigned int i;
 	pthread_attr_t thread_attr;
 	struct worker *worker = NULL;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_hash_usage, 0);
 	if (argc) {
tools/perf/bench/futex-lock-pi.c +2 -2
index d02330a69745..596769924709 100644
@@ -116,7 +116,7 @@ static void *workerfn(void *arg)
 }
 
 static void create_threads(struct worker *w, pthread_attr_t thread_attr,
-			   struct cpu_map *cpu)
+			   struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -150,7 +150,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
 	unsigned int i;
 	struct sigaction act;
 	pthread_attr_t thread_attr;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_lock_pi_usage, 0);
 	if (argc)
tools/perf/bench/futex-requeue.c +2 -2
index fc692efa0c05..1fd32a4f9c14 100644
@@ -84,7 +84,7 @@ static void *workerfn(void *arg __maybe_unused)
 }
 
 static void block_threads(pthread_t *w,
-			  pthread_attr_t thread_attr, struct cpu_map *cpu)
+			  pthread_attr_t thread_attr, struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -117,7 +117,7 @@ int bench_futex_requeue(int argc, const char **argv)
 	unsigned int i, j;
 	struct sigaction act;
 	pthread_attr_t thread_attr;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0);
 	if (argc)
tools/perf/bench/futex-wake-parallel.c +2 -2
index 69d8fdc87315..884c73e5bd1b 100644
@@ -138,7 +138,7 @@ static void *blocked_workerfn(void *arg __maybe_unused)
 }
 
 static void block_threads(pthread_t *w, pthread_attr_t thread_attr,
-			  struct cpu_map *cpu)
+			  struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -224,7 +224,7 @@ int bench_futex_wake_parallel(int argc, const char **argv)
 	struct sigaction act;
 	pthread_attr_t thread_attr;
 	struct thread_data *waking_worker;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options,
 			     bench_futex_wake_parallel_usage, 0);
tools/perf/bench/futex-wake.c +2 -2
index e8181ad7d088..2288fa8412ff 100644
@@ -90,7 +90,7 @@ static void print_summary(void)
 }
 
 static void block_threads(pthread_t *w,
-			  pthread_attr_t thread_attr, struct cpu_map *cpu)
+			  pthread_attr_t thread_attr, struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -123,7 +123,7 @@ int bench_futex_wake(int argc, const char **argv)
 	unsigned int i, j;
 	struct sigaction act;
 	pthread_attr_t thread_attr;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_wake_usage, 0);
 	if (argc) {
tools/perf/builtin-c2c.c +1 -1
index e3776f5c2e01..52035dacf253 100644
@@ -2049,7 +2049,7 @@ static int setup_nodes(struct perf_session *session)
 	c2c.cpu2node = cpu2node;
 
 	for (node = 0; node < c2c.nodes_cnt; node++) {
-		struct cpu_map *map = n[node].map;
+		struct perf_cpu_map *map = n[node].map;
 		unsigned long *set;
 
 		set = bitmap_alloc(c2c.cpus_cnt);
tools/perf/builtin-ftrace.c +3 -3
index 66d5a6658daf..3e81e0b6628f 100644
@@ -165,7 +165,7 @@ static int set_tracing_pid(struct perf_ftrace *ftrace)
 	return 0;
 }
 
-static int set_tracing_cpumask(struct cpu_map *cpumap)
+static int set_tracing_cpumask(struct perf_cpu_map *cpumap)
 {
 	char *cpumask;
 	size_t mask_size;
@@ -192,7 +192,7 @@ static int set_tracing_cpumask(struct cpu_map *cpumap)
 
 static int set_tracing_cpu(struct perf_ftrace *ftrace)
 {
-	struct cpu_map *cpumap = ftrace->evlist->cpus;
+	struct perf_cpu_map *cpumap = ftrace->evlist->cpus;
 
 	if (!target__has_cpu(&ftrace->target))
 		return 0;
@@ -202,7 +202,7 @@ static int set_tracing_cpu(struct perf_ftrace *ftrace)
 
 static int reset_tracing_cpu(void)
 {
-	struct cpu_map *cpumap = cpu_map__new(NULL);
+	struct perf_cpu_map *cpumap = cpu_map__new(NULL);
 	int ret;
 
 	ret = set_tracing_cpumask(cpumap);
tools/perf/builtin-sched.c +4 -4
index 56d1907b1215..51dd48f20972 100644
@@ -161,9 +161,9 @@ struct perf_sched_map {
 	bool			 comp;
 	struct thread_map	*color_pids;
 	const char		*color_pids_str;
-	struct cpu_map		*color_cpus;
+	struct perf_cpu_map	*color_cpus;
 	const char		*color_cpus_str;
-	struct cpu_map		*cpus;
+	struct perf_cpu_map	*cpus;
 	const char		*cpus_str;
 };
 
@@ -3170,7 +3170,7 @@ static int perf_sched__lat(struct perf_sched *sched)
 
 static int setup_map_cpus(struct perf_sched *sched)
 {
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	sched->max_cpu  = sysconf(_SC_NPROCESSORS_CONF);
 
@@ -3212,7 +3212,7 @@ static int setup_color_pids(struct perf_sched *sched)
 
 static int setup_color_cpus(struct perf_sched *sched)
 {
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	if (!sched->map.color_cpus_str)
 		return 0;
tools/perf/builtin-script.c +1 -1
index 0140ddb8dd0b..0109c8710b93 100644
@@ -1627,7 +1627,7 @@ struct perf_script {
 	bool			show_bpf_events;
 	bool			allocated;
 	bool			per_event_dump;
-	struct cpu_map		*cpus;
+	struct perf_cpu_map	*cpus;
 	struct thread_map	*threads;
 	int			name_width;
 	const char              *time_str;
tools/perf/builtin-stat.c +23 -23

152 lines not on this page · raw message

tools/perf/tests/bitmap.c +1 -1
index 96e7fc1ad3f9..74d0cd32a5c4 100644
@@ -9,7 +9,7 @@
 
 static unsigned long *get_bitmap(const char *str, int nbits)
 {
-	struct cpu_map *map = cpu_map__new(str);
+	struct perf_cpu_map *map = cpu_map__new(str);
 	unsigned long *bm = NULL;
 	int i;
 
tools/perf/tests/code-reading.c +1 -1
index aa6df122b175..948ec278ad06 100644
@@ -553,7 +553,7 @@ static int do_test_code_reading(bool try_kcore)
 		.done_cnt = 0,
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
 	int err = -1, ret;
tools/perf/tests/cpumap.c +4 -4
index e78b897677bd..10da4400493d 100644
@@ -17,7 +17,7 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused,
 	struct cpu_map_event *map_event = &event->cpu_map;
 	struct cpu_map_mask *mask;
 	struct cpu_map_data *data;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	int i;
 
 	data = &map_event->data;
@@ -51,7 +51,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 	struct cpu_map_event *map_event = &event->cpu_map;
 	struct cpu_map_entries *cpus;
 	struct cpu_map_data *data;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	data = &map_event->data;
 
@@ -75,7 +75,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 
 int test__cpu_map_synthesize(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 
 	/* This one is better stores in mask. */
 	cpus = cpu_map__new("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19");
@@ -97,7 +97,7 @@ int test__cpu_map_synthesize(struct test *test __maybe_unused, int subtest __may
 
 static int cpu_map_print(const char *str)
 {
-	struct cpu_map *map = cpu_map__new(str);
+	struct perf_cpu_map *map = cpu_map__new(str);
 	char buf[100];
 
 	if (!map)
tools/perf/tests/event-times.c +2 -2
index 1a2686f1fcf0..ed90b62bf048 100644
@@ -110,7 +110,7 @@ static int detach__disable(struct perf_evlist *evlist)
 static int attach__cpu_disabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int err;
 
 	pr_debug("attaching to CPU 0 as enabled\n");
@@ -139,7 +139,7 @@ static int attach__cpu_disabled(struct perf_evlist *evlist)
 static int attach__cpu_enabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int err;
 
 	pr_debug("attaching to CPU 0 as enabled\n");
tools/perf/tests/event_update.c +1 -1
index f14dcd613438..b5042f019ec4 100644
@@ -61,7 +61,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 {
 	struct event_update_event *ev = (struct event_update_event*) event;
 	struct event_update_event_cpus *ev_data;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	ev_data = (struct event_update_event_cpus*) ev->data;
 
tools/perf/tests/keep-tracking.c +1 -1
index 17c46f3e6f1e..68331a81bcdd 100644
@@ -66,7 +66,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 		},
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
 	int found, err = -1;
tools/perf/tests/mem2node.c +1 -1
index 520cc91af256..e12eedfba781 100644
@@ -19,7 +19,7 @@ static struct node {
 
 static unsigned long *get_bitmap(const char *str, int nbits)
 {
-	struct cpu_map *map = cpu_map__new(str);
+	struct perf_cpu_map *map = cpu_map__new(str);
 	unsigned long *bm = NULL;
 	int i;
 
tools/perf/tests/mmap-basic.c +1 -1
index 0919b0793e5b..1bc8fd3ea510 100644
@@ -28,7 +28,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 	int err = -1;
 	union perf_event *event;
 	struct thread_map *threads;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct perf_evlist *evlist;
 	cpu_set_t cpu_set;
 	const char *syscall_names[] = { "getsid", "getppid", "getpgid", };
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
index 493ecb611540..f393aa836dfb 100644
@@ -20,7 +20,7 @@
 int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	int err = -1, fd, cpu;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct perf_evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
tools/perf/tests/sw-clock.c +1 -1
index f9490b237893..d9121b5033b7 100644
@@ -37,7 +37,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		.disabled = 1,
 		.freq = 1,
 	};
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 	struct perf_mmap *md;
 
tools/perf/tests/switch-tracking.c +1 -1
index 6cdab5f4812a..826f20a4cb51 100644
@@ -328,7 +328,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 		},
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
 	struct perf_evsel *switch_evsel, *tracking_evsel;
tools/perf/tests/task-exit.c +1 -1
index e92fa6029ac7..d66767be4c45 100644
@@ -45,7 +45,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
 	};
 	const char *argv[] = { "true", NULL };
 	char sbuf[STRERR_BUFSIZE];
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 	struct perf_mmap *md;
 
tools/perf/tests/topology.c +2 -2
index 9497d02f69e6..443d0272ebbd 100644
@@ -57,7 +57,7 @@ static int session_write_header(char *path)
 	return 0;
 }
 
-static int check_cpu_topology(char *path, struct cpu_map *map)
+static int check_cpu_topology(char *path, struct perf_cpu_map *map)
 {
 	struct perf_session *session;
 	struct perf_data data = {
@@ -116,7 +116,7 @@ static int check_cpu_topology(char *path, struct cpu_map *map)
 int test__session_topology(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	char path[PATH_MAX];
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	int ret = TEST_FAIL;
 
 	TEST_ASSERT_VAL("can't get templ file", !get_temp(path));
tools/perf/util/cpumap.c +39 -39

245 lines not on this page · raw message

tools/perf/util/cpumap.h +26 -26

84 lines not on this page · raw message

tools/perf/util/cputopo.c +2 -2
index 64336a280967..157b0988435e 100644
@@ -176,7 +176,7 @@ struct cpu_topology *cpu_topology__new(void)
 	size_t sz;
 	long ncpus;
 	int ret = -1;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	bool has_die = has_die_topology();
 
 	ncpus = cpu__max_present_cpu();
@@ -289,7 +289,7 @@ static int load_numa_node(struct numa_topology_node *node, int nr)
 
 struct numa_topology *numa_topology__new(void)
 {
-	struct cpu_map *node_map = NULL;
+	struct perf_cpu_map *node_map = NULL;
 	struct numa_topology *tp = NULL;
 	char path[MAXPATHLEN];
 	char *buf = NULL;
tools/perf/util/env.h +1 -1
index d5d9865aa812..d8e083d42610 100644
@@ -27,7 +27,7 @@ struct numa_node {
 	u32		 node;
 	u64		 mem_total;
 	u64		 mem_free;
-	struct cpu_map	*map;
+	struct perf_cpu_map	*map;
 };
 
 struct memory_node {
tools/perf/util/event.c +9 -9
index f1f4848947ce..406ad8772907 100644
@@ -1008,7 +1008,7 @@ int perf_event__synthesize_thread_map2(struct perf_tool *tool,
 }
 
 static void synthesize_cpus(struct cpu_map_entries *cpus,
-			    struct cpu_map *map)
+			    struct perf_cpu_map *map)
 {
 	int i;
 
@@ -1019,7 +1019,7 @@ static void synthesize_cpus(struct cpu_map_entries *cpus,
 }
 
 static void synthesize_mask(struct cpu_map_mask *mask,
-			    struct cpu_map *map, int max)
+			    struct perf_cpu_map *map, int max)
 {
 	int i;
 
@@ -1030,12 +1030,12 @@ static void synthesize_mask(struct cpu_map_mask *mask,
 		set_bit(map->map[i], mask->mask);
 }
 
-static size_t cpus_size(struct cpu_map *map)
+static size_t cpus_size(struct perf_cpu_map *map)
 {
 	return sizeof(struct cpu_map_entries) + map->nr * sizeof(u16);
 }
 
-static size_t mask_size(struct cpu_map *map, int *max)
+static size_t mask_size(struct perf_cpu_map *map, int *max)
 {
 	int i;
 
@@ -1052,7 +1052,7 @@ static size_t mask_size(struct cpu_map *map, int *max)
 	return sizeof(struct cpu_map_mask) + BITS_TO_LONGS(*max) * sizeof(long);
 }
 
-void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max)
+void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max)
 {
 	size_t size_cpus, size_mask;
 	bool is_dummy = cpu_map__empty(map);
@@ -1086,7 +1086,7 @@ void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max
 	return zalloc(*size);
 }
 
-void cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map,
+void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map,
 			      u16 type, int max)
 {
 	data->type = type;
@@ -1102,7 +1102,7 @@ void cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map,
 	};
 }
 
-static struct cpu_map_event* cpu_map_event__new(struct cpu_map *map)
+static struct cpu_map_event* cpu_map_event__new(struct perf_cpu_map *map)
 {
 	size_t size = sizeof(struct cpu_map_event);
 	struct cpu_map_event *event;
@@ -1122,7 +1122,7 @@ static struct cpu_map_event* cpu_map_event__new(struct cpu_map *map)
 }
 
 int perf_event__synthesize_cpu_map(struct perf_tool *tool,
-				   struct cpu_map *map,
+				   struct perf_cpu_map *map,
 				   perf_event__handler_t process,
 				   struct machine *machine)
 {
@@ -1393,7 +1393,7 @@ size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp)
 
 size_t perf_event__fprintf_cpu_map(union perf_event *event, FILE *fp)
 {
-	struct cpu_map *cpus = cpu_map__new_data(&event->cpu_map.data);
+	struct perf_cpu_map *cpus = cpu_map__new_data(&event->cpu_map.data);
 	size_t ret;
 
 	ret = fprintf(fp, ": ");
tools/perf/util/event.h +4 -4
index 1f1da6082806..cafaac5128ab 100644
@@ -675,7 +675,7 @@ void perf_event__print_totals(void);
 
 struct perf_tool;
 struct thread_map;
-struct cpu_map;
+struct perf_cpu_map;
 struct perf_stat_config;
 struct perf_counts_values;
 
@@ -693,7 +693,7 @@ int perf_event__synthesize_thread_map2(struct perf_tool *tool,
 				      perf_event__handler_t process,
 				      struct machine *machine);
 int perf_event__synthesize_cpu_map(struct perf_tool *tool,
-				   struct cpu_map *cpus,
+				   struct perf_cpu_map *cpus,
 				   perf_event__handler_t process,
 				   struct machine *machine);
 int perf_event__synthesize_threads(struct perf_tool *tool,
@@ -844,8 +844,8 @@ size_t perf_event__fprintf(union perf_event *event, FILE *fp);
 int kallsyms__get_function_start(const char *kallsyms_filename,
 				 const char *symbol_name, u64 *addr);
 
-void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max);
-void  cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map,
+void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max);
+void  cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map,
 			       u16 type, int max);
 
 void event_attr_init(struct perf_event_attr *attr);
tools/perf/util/evlist.c +5 -5
index b0364d923f76..bce883eaf0dc 100644
@@ -41,7 +41,7 @@ int sigqueue(pid_t pid, int sig, const union sigval value);
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
-void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 		       struct thread_map *threads)
 {
 	int i;
@@ -1012,7 +1012,7 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
 			 int comp_level)
 {
 	struct perf_evsel *evsel;
-	const struct cpu_map *cpus = evlist->cpus;
+	const struct perf_cpu_map *cpus = evlist->cpus;
 	const struct thread_map *threads = evlist->threads;
 	/*
 	 * Delay setting mp.prot: set it before calling perf_mmap__mmap.
@@ -1058,7 +1058,7 @@ int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
 int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 {
 	bool all_threads = (target->per_thread && target->system_wide);
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 
 	/*
@@ -1104,7 +1104,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 	return -1;
 }
 
-void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 			   struct thread_map *threads)
 {
 	/*
@@ -1358,7 +1358,7 @@ void perf_evlist__close(struct perf_evlist *evlist)
 
 static int perf_evlist__create_syswide_maps(struct perf_evlist *evlist)
 {
-	struct cpu_map	  *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 	int err = -ENOMEM;
 
tools/perf/util/evlist.h +4 -4
index 49354fe24d5f..c8cda300b584 100644
@@ -18,7 +18,7 @@
 
 struct pollfd;
 struct thread_map;
-struct cpu_map;
+struct perf_cpu_map;
 struct record_opts;
 
 #define PERF_EVLIST__HLIST_BITS 8
@@ -45,7 +45,7 @@ struct perf_evlist {
 	struct perf_mmap *mmap;
 	struct perf_mmap *overwrite_mmap;
 	struct thread_map *threads;
-	struct cpu_map	  *cpus;
+	struct perf_cpu_map *cpus;
 	struct perf_evsel *selected;
 	struct events_stats stats;
 	struct perf_env	*env;
@@ -68,7 +68,7 @@ struct perf_evsel_str_handler {
 struct perf_evlist *perf_evlist__new(void);
 struct perf_evlist *perf_evlist__new_default(void);
 struct perf_evlist *perf_evlist__new_dummy(void);
-void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 		       struct thread_map *threads);
 void perf_evlist__exit(struct perf_evlist *evlist);
 void perf_evlist__delete(struct perf_evlist *evlist);
@@ -194,7 +194,7 @@ int perf_evlist__enable_event_idx(struct perf_evlist *evlist,
 void perf_evlist__set_selected(struct perf_evlist *evlist,
 			       struct perf_evsel *evsel);
 
-void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 			   struct thread_map *threads);
 int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target);
 int perf_evlist__apply_filters(struct perf_evlist *evlist, struct perf_evsel **err_evsel);
tools/perf/util/evsel.c +4 -4
index d23b9574f793..958206c538c3 100644
@@ -1825,7 +1825,7 @@ static int perf_event_open(struct perf_evsel *evsel,
 	return fd;
 }
 
-int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
+int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
 		     struct thread_map *threads)
 {
 	int cpu, thread, nthreads;
@@ -1837,7 +1837,7 @@ int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 		return -EINVAL;
 
 	if (cpus == NULL) {
-		static struct cpu_map *empty_cpu_map;
+		static struct perf_cpu_map *empty_cpu_map;
 
 		if (empty_cpu_map == NULL) {
 			empty_cpu_map = cpu_map__dummy_new();
@@ -2084,7 +2084,7 @@ void perf_evsel__close(struct perf_evsel *evsel)
 }
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
-			     struct cpu_map *cpus)
+			     struct perf_cpu_map *cpus)
 {
 	return perf_evsel__open(evsel, cpus, NULL);
 }
@@ -3064,7 +3064,7 @@ static int store_evsel_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 
 int perf_evsel__store_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 {
-	struct cpu_map *cpus = evsel->cpus;
+	struct perf_cpu_map *cpus = evsel->cpus;
 	struct thread_map *threads = evsel->threads;
 
 	if (perf_evsel__alloc_id(evsel, cpus->nr, threads->nr))
tools/perf/util/evsel.h +6 -6
index b27935a6d36c..76b14037f260 100644
@@ -124,8 +124,8 @@ struct perf_evsel {
 	u64			db_id;
 	struct cgroup		*cgrp;
 	void			*handler;
-	struct cpu_map		*cpus;
-	struct cpu_map		*own_cpus;
+	struct perf_cpu_map	*cpus;
+	struct perf_cpu_map	*own_cpus;
 	struct thread_map	*threads;
 	unsigned int		sample_size;
 	int			id_pos;
@@ -192,12 +192,12 @@ struct perf_missing_features {
 
 extern struct perf_missing_features perf_missing_features;
 
-struct cpu_map;
+struct perf_cpu_map;
 struct target;
 struct thread_map;
 struct record_opts;
 
-static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
+static inline struct perf_cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
 {
 	return evsel->cpus;
 }
@@ -300,10 +300,10 @@ int perf_evsel__enable(struct perf_evsel *evsel);
 int perf_evsel__disable(struct perf_evsel *evsel);
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
-			     struct cpu_map *cpus);
+			     struct perf_cpu_map *cpus);
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
 				struct thread_map *threads);
-int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
+int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
 		     struct thread_map *threads);
 void perf_evsel__close(struct perf_evsel *evsel);
 
tools/perf/util/header.c +2 -2
index 20111f8da5cb..496c0ab851ca 100644
@@ -3879,7 +3879,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp)
 	struct event_update_event *ev = &event->event_update;
 	struct event_update_event_scale *ev_scale;
 	struct event_update_event_cpus *ev_cpus;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	size_t ret;
 
 	ret = fprintf(fp, "\n... id:    %" PRIu64 "\n", ev->id);
@@ -4047,7 +4047,7 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused,
 	struct event_update_event_cpus *ev_cpus;
 	struct perf_evlist *evlist;
 	struct perf_evsel *evsel;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	if (!pevlist || *pevlist == NULL)
 		return -EINVAL;
tools/perf/util/mmap.c +1 -1
index 9f0b6391af33..177c41fc9842 100644
@@ -325,7 +325,7 @@ void perf_mmap__munmap(struct perf_mmap *map)
 static void build_node_mask(int node, cpu_set_t *mask)
 {
 	int c, cpu, nr_cpus;
-	const struct cpu_map *cpu_map = NULL;
+	const struct perf_cpu_map *cpu_map = NULL;
 
 	cpu_map = cpu_map__online();
 	if (!cpu_map)
tools/perf/util/parse-events.c +1 -1
index 0540303e5e97..077509609d03 100644
@@ -322,7 +322,7 @@ __add_event(struct list_head *list, int *idx,
 	    const char *cpu_list)
 {
 	struct perf_evsel *evsel;
-	struct cpu_map *cpus = pmu ? pmu->cpus :
+	struct perf_cpu_map *cpus = pmu ? pmu->cpus :
 			       cpu_list ? cpu_map__new(cpu_list) : NULL;
 
 	event_attr_init(attr);
tools/perf/util/pmu.c +5 -5
index f32b710347db..4929a50c0973 100644
@@ -572,10 +572,10 @@ static void pmu_read_sysfs(void)
 	closedir(dir);
 }
 
-static struct cpu_map *__pmu_cpumask(const char *path)
+static struct perf_cpu_map *__pmu_cpumask(const char *path)
 {
 	FILE *file;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 
 	file = fopen(path, "r");
 	if (!file)
@@ -593,10 +593,10 @@ static struct cpu_map *__pmu_cpumask(const char *path)
 #define CPUS_TEMPLATE_UNCORE	"%s/bus/event_source/devices/%s/cpumask"
 #define CPUS_TEMPLATE_CPU	"%s/bus/event_source/devices/%s/cpus"
 
-static struct cpu_map *pmu_cpumask(const char *name)
+static struct perf_cpu_map *pmu_cpumask(const char *name)
 {
 	char path[PATH_MAX];
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	const char *sysfs = sysfs__mountpoint();
 	const char *templates[] = {
 		CPUS_TEMPLATE_UNCORE,
@@ -621,7 +621,7 @@ static struct cpu_map *pmu_cpumask(const char *name)
 static bool pmu_is_uncore(const char *name)
 {
 	char path[PATH_MAX];
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	const char *sysfs = sysfs__mountpoint();
 
 	snprintf(path, PATH_MAX, CPUS_TEMPLATE_UNCORE, sysfs, name);
tools/perf/util/pmu.h +1 -1
index bd9ec2704a57..3f8b79b1dd85 100644
@@ -28,7 +28,7 @@ struct perf_pmu {
 	bool is_uncore;
 	int max_precise;
 	struct perf_event_attr *default_config;
-	struct cpu_map *cpus;
+	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 list;    /* ELEM */
tools/perf/util/python.c +3 -3
index 1e5b6718dcea..be27956ae080 100644
@@ -536,7 +536,7 @@ static PyObject *pyrf_event__new(union perf_event *event)
 struct pyrf_cpu_map {
 	PyObject_HEAD
 
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 };
 
 static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus,
@@ -796,7 +796,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
 				  PyObject *args, PyObject *kwargs)
 {
 	struct perf_evsel *evsel = &pevsel->evsel;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct thread_map *threads = NULL;
 	PyObject *pcpus = NULL, *pthreads = NULL;
 	int group = 0, inherit = 0;
@@ -865,7 +865,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist,
 			     PyObject *args, PyObject *kwargs __maybe_unused)
 {
 	PyObject *pcpus = NULL, *pthreads = NULL;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 
 	if (!PyArg_ParseTuple(args, "OO", &pcpus, &pthreads))
tools/perf/util/record.c +3 -3
index 9cfc7bf16531..051c67f82548 100644
@@ -60,7 +60,7 @@ static int perf_do_probe_api(setup_probe_fn_t fn, int cpu, const char *str)
 static bool perf_probe_api(setup_probe_fn_t fn)
 {
 	const char *try[] = {"cycles:u", "instructions:u", "cpu-clock:u", NULL};
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int cpu, ret, i = 0;
 
 	cpus = cpu_map__new(NULL);
@@ -115,7 +115,7 @@ bool perf_can_record_cpu_wide(void)
 		.config = PERF_COUNT_SW_CPU_CLOCK,
 		.exclude_kernel = 1,
 	};
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int cpu, fd;
 
 	cpus = cpu_map__new(NULL);
@@ -275,7 +275,7 @@ bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str)
 	evsel = perf_evlist__last(temp_evlist);
 
 	if (!evlist || cpu_map__empty(evlist->cpus)) {
-		struct cpu_map *cpus = cpu_map__new(NULL);
+		struct perf_cpu_map *cpus = cpu_map__new(NULL);
 
 		cpu =  cpus ? cpus->map[0] : 0;
 		cpu_map__put(cpus);
tools/perf/util/scripting-engines/trace-event-python.c +1 -1
index 25dc1d765553..a53b30b8819b 100644
@@ -1393,7 +1393,7 @@ static void python_process_stat(struct perf_stat_config *config,
 				struct perf_evsel *counter, u64 tstamp)
 {
 	struct thread_map *threads = counter->threads;
-	struct cpu_map *cpus = counter->cpus;
+	struct perf_cpu_map *cpus = counter->cpus;
 	int cpu, thread;
 
 	if (config->aggr_mode == AGGR_GLOBAL) {
tools/perf/util/session.c +1 -1
index 37efa1f43d8b..69d1d158a610 100644
@@ -2273,7 +2273,7 @@ int perf_session__cpu_bitmap(struct perf_session *session,
 			     const char *cpu_list, unsigned long *cpu_bitmap)
 {
 	int i, err = -1;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	for (i = 0; i < PERF_TYPE_MAX; ++i) {
 		struct perf_evsel *evsel;
tools/perf/util/stat.c +1 -1
index db8a6cf336be..62791c063f7a 100644
@@ -215,7 +215,7 @@ static int check_per_pkg(struct perf_evsel *counter,
 			 struct perf_counts_values *vals, int cpu, bool *skip)
 {
 	unsigned long *mask = counter->per_pkg_mask;
-	struct cpu_map *cpus = perf_evsel__cpus(counter);
+	struct perf_cpu_map *cpus = perf_evsel__cpus(counter);
 	int s;
 
 	*skip = false;
tools/perf/util/stat.h +3 -3
index 7032dd1eeac2..fa675d09febd 100644
@@ -92,7 +92,7 @@ struct runtime_stat {
 };
 
 typedef int (*aggr_get_id_t)(struct perf_stat_config *config,
-			     struct cpu_map *m, int cpu);
+			     struct perf_cpu_map *m, int cpu);
 
 struct perf_stat_config {
 	enum aggr_mode		 aggr_mode;
@@ -122,9 +122,9 @@ struct perf_stat_config {
 	const char		*csv_sep;
 	struct stats		*walltime_nsecs_stats;
 	struct rusage		 ru_data;
-	struct cpu_map		*aggr_map;
+	struct perf_cpu_map		*aggr_map;
 	aggr_get_id_t		 aggr_get_id;
-	struct cpu_map		*cpus_aggr_map;
+	struct perf_cpu_map		*cpus_aggr_map;
 	u64			*walltime_run;
 	struct rblist		 metric_events;
 };
tools/perf/util/svghelper.c +1 -1
index 76cc54000483..99132c6a30a6 100644
@@ -728,7 +728,7 @@ static int str_to_bitmap(char *s, cpumask_t *b)
 {
 	int i;
 	int ret = 0;
-	struct cpu_map *m;
+	struct perf_cpu_map *m;
 	int c;
 
 	m = cpu_map__new(s);
Signature · 1 line
2.21.0
#4 lore raw

[tip:perf/core] perf cpu_map: Rename struct cpu_map to struct perf_cpu_map

perf cpu_map: Rename struct cpu_map to struct perf_cpu_map
Commit-ID:  f854839ba2a546a888159667c5ade96793e5cd10
Gitweb:     https://git.kernel.org/tip/f854839ba2a546a888159667c5ade96793e5cd10
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:49 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf cpu_map: Rename struct cpu_map to struct perf_cpu_map

Rename struct cpu_map to struct perf_cpu_map, so it could be part of libperf.

Committer notes:

Added fixes for arm64, provided by Jiri.

---
 tools/perf/arch/arm/util/cs-etm.c                  | 16 ++---
 tools/perf/arch/arm64/util/header.c                |  2 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c       |  2 +-
 tools/perf/arch/x86/util/intel-bts.c               |  2 +-
 tools/perf/arch/x86/util/intel-pt.c                |  2 +-
 tools/perf/bench/epoll-ctl.c                       |  4 +-
 tools/perf/bench/epoll-wait.c                      |  4 +-
 tools/perf/bench/futex-hash.c                      |  2 +-
 tools/perf/bench/futex-lock-pi.c                   |  4 +-
 tools/perf/bench/futex-requeue.c                   |  4 +-
 tools/perf/bench/futex-wake-parallel.c             |  4 +-
 tools/perf/bench/futex-wake.c                      |  4 +-
 tools/perf/builtin-c2c.c                           |  2 +-
 tools/perf/builtin-ftrace.c                        |  6 +-
 tools/perf/builtin-sched.c                         |  8 +--
 tools/perf/builtin-script.c                        |  2 +-
 tools/perf/builtin-stat.c                          | 46 ++++++-------
 tools/perf/tests/bitmap.c                          |  2 +-
 tools/perf/tests/code-reading.c                    |  2 +-
 tools/perf/tests/cpumap.c                          |  8 +--
 tools/perf/tests/event-times.c                     |  4 +-
 tools/perf/tests/event_update.c                    |  2 +-
 tools/perf/tests/keep-tracking.c                   |  2 +-
 tools/perf/tests/mem2node.c                        |  2 +-
 tools/perf/tests/mmap-basic.c                      |  2 +-
 tools/perf/tests/openat-syscall-all-cpus.c         |  2 +-
 tools/perf/tests/sw-clock.c                        |  2 +-
 tools/perf/tests/switch-tracking.c                 |  2 +-
 tools/perf/tests/task-exit.c                       |  2 +-
 tools/perf/tests/topology.c                        |  4 +-
 tools/perf/util/cpumap.c                           | 78 +++++++++++-----------
 tools/perf/util/cpumap.h                           | 52 +++++++--------
 tools/perf/util/cputopo.c                          |  4 +-
 tools/perf/util/env.h                              |  2 +-
 tools/perf/util/event.c                            | 18 ++---
 tools/perf/util/event.h                            |  8 +--
 tools/perf/util/evlist.c                           | 10 +--
 tools/perf/util/evlist.h                           |  8 +--
 tools/perf/util/evsel.c                            |  8 +--
 tools/perf/util/evsel.h                            | 12 ++--
 tools/perf/util/header.c                           |  4 +-
 tools/perf/util/mmap.c                             |  2 +-
 tools/perf/util/parse-events.c                     |  2 +-
 tools/perf/util/pmu.c                              | 10 +--
 tools/perf/util/pmu.h                              |  2 +-
 tools/perf/util/python.c                           |  6 +-
 tools/perf/util/record.c                           |  6 +-
 .../util/scripting-engines/trace-event-python.c    |  2 +-
 tools/perf/util/session.c                          |  2 +-
 tools/perf/util/stat.c                             |  2 +-
 tools/perf/util/stat.h                             |  6 +-
 tools/perf/util/svghelper.c                        |  2 +-
 52 files changed, 198 insertions(+), 198 deletions(-)
tools/perf/arch/arm/util/cs-etm.c +8 -8
index 4208974c24f8..d08b55c27774 100644
@@ -155,8 +155,8 @@ static int cs_etm_set_option(struct auxtrace_record *itr,
 			     struct perf_evsel *evsel, u32 option)
 {
 	int i, err = -EINVAL;
-	struct cpu_map *event_cpus = evsel->evlist->cpus;
-	struct cpu_map *online_cpus = cpu_map__new(NULL);
+	struct perf_cpu_map *event_cpus = evsel->evlist->cpus;
+	struct perf_cpu_map *online_cpus = cpu_map__new(NULL);
 
 	/* Set option of each CPU we have */
 	for (i = 0; i < cpu__max_cpu(); i++) {
@@ -253,7 +253,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
 				container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
 	struct perf_evsel *evsel, *cs_etm_evsel = NULL;
-	struct cpu_map *cpus = evlist->cpus;
+	struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = (geteuid() == 0 || perf_event_paranoid() < 0);
 	int err = 0;
 
@@ -489,8 +489,8 @@ cs_etm_info_priv_size(struct auxtrace_record *itr __maybe_unused,
 {
 	int i;
 	int etmv3 = 0, etmv4 = 0;
-	struct cpu_map *event_cpus = evlist->cpus;
-	struct cpu_map *online_cpus = cpu_map__new(NULL);
+	struct perf_cpu_map *event_cpus = evlist->cpus;
+	struct perf_cpu_map *online_cpus = cpu_map__new(NULL);
 
 	/* cpu map is not empty, we have specific CPUs to work with */
 	if (!cpu_map__empty(event_cpus)) {
@@ -635,9 +635,9 @@ static int cs_etm_info_fill(struct auxtrace_record *itr,
 	int i;
 	u32 offset;
 	u64 nr_cpu, type;
-	struct cpu_map *cpu_map;
-	struct cpu_map *event_cpus = session->evlist->cpus;
-	struct cpu_map *online_cpus = cpu_map__new(NULL);
+	struct perf_cpu_map *cpu_map;
+	struct perf_cpu_map *event_cpus = session->evlist->cpus;
+	struct perf_cpu_map *online_cpus = cpu_map__new(NULL);
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
tools/perf/arch/arm64/util/header.c +1 -1
index 534cd2507d83..b3e73a413f5a 100644
@@ -16,7 +16,7 @@ char *get_cpuid_str(struct perf_pmu *pmu)
 	const char *sysfs = sysfs__mountpoint();
 	int cpu;
 	u64 midr = 0;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	FILE *file;
 
 	if (!sysfs || !pmu || !pmu->cpus)
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index 7a7721604b86..4676fd967dc6 100644
@@ -50,7 +50,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 		.sample_time	     = true,
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
 	int err = -1, ret, i;
tools/perf/arch/x86/util/intel-bts.c +1 -1
index ec5c1bb84095..da1583d27efd 100644
@@ -106,7 +106,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
 			container_of(itr, struct intel_bts_recording, itr);
 	struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu;
 	struct perf_evsel *evsel, *intel_bts_evsel = NULL;
-	const struct cpu_map *cpus = evlist->cpus;
+	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 
 	btsr->evlist = evlist;
tools/perf/arch/x86/util/intel-pt.c +1 -1
index 609088c01e3a..69a23e40abc9 100644
@@ -557,7 +557,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 	struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu;
 	bool have_timing_info, need_immediate = false;
 	struct perf_evsel *evsel, *intel_pt_evsel = NULL;
-	const struct cpu_map *cpus = evlist->cpus;
+	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 	u64 tsc_bit;
 	int err;
tools/perf/bench/epoll-ctl.c +2 -2
index 2af067859966..1fd724f1d48b 100644
@@ -219,7 +219,7 @@ static void init_fdmaps(struct worker *w, int pct)
 	}
 }
 
-static int do_threads(struct worker *worker, struct cpu_map *cpu)
+static int do_threads(struct worker *worker, struct perf_cpu_map *cpu)
 {
 	pthread_attr_t thread_attr, *attrp = NULL;
 	cpu_set_t cpuset;
@@ -301,7 +301,7 @@ int bench_epoll_ctl(int argc, const char **argv)
 	int j, ret = 0;
 	struct sigaction act;
 	struct worker *worker = NULL;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 	struct rlimit rl, prevrl;
 	unsigned int i;
 
tools/perf/bench/epoll-wait.c +2 -2
index fe85448abd45..79a254fff2d1 100644
@@ -288,7 +288,7 @@ static void print_summary(void)
 	       (int) runtime.tv_sec);
 }
 
-static int do_threads(struct worker *worker, struct cpu_map *cpu)
+static int do_threads(struct worker *worker, struct perf_cpu_map *cpu)
 {
 	pthread_attr_t thread_attr, *attrp = NULL;
 	cpu_set_t cpuset;
@@ -415,7 +415,7 @@ int bench_epoll_wait(int argc, const char **argv)
 	struct sigaction act;
 	unsigned int i;
 	struct worker *worker = NULL;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 	pthread_t wthread;
 	struct rlimit rl, prevrl;
 
tools/perf/bench/futex-hash.c +1 -1
index a80797763e1f..b4fea8e3a368 100644
@@ -124,7 +124,7 @@ int bench_futex_hash(int argc, const char **argv)
 	unsigned int i;
 	pthread_attr_t thread_attr;
 	struct worker *worker = NULL;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_hash_usage, 0);
 	if (argc) {
tools/perf/bench/futex-lock-pi.c +2 -2
index d02330a69745..596769924709 100644
@@ -116,7 +116,7 @@ static void *workerfn(void *arg)
 }
 
 static void create_threads(struct worker *w, pthread_attr_t thread_attr,
-			   struct cpu_map *cpu)
+			   struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -150,7 +150,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
 	unsigned int i;
 	struct sigaction act;
 	pthread_attr_t thread_attr;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_lock_pi_usage, 0);
 	if (argc)
tools/perf/bench/futex-requeue.c +2 -2
index fc692efa0c05..1fd32a4f9c14 100644
@@ -84,7 +84,7 @@ static void *workerfn(void *arg __maybe_unused)
 }
 
 static void block_threads(pthread_t *w,
-			  pthread_attr_t thread_attr, struct cpu_map *cpu)
+			  pthread_attr_t thread_attr, struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -117,7 +117,7 @@ int bench_futex_requeue(int argc, const char **argv)
 	unsigned int i, j;
 	struct sigaction act;
 	pthread_attr_t thread_attr;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0);
 	if (argc)
tools/perf/bench/futex-wake-parallel.c +2 -2
index 69d8fdc87315..884c73e5bd1b 100644
@@ -138,7 +138,7 @@ static void *blocked_workerfn(void *arg __maybe_unused)
 }
 
 static void block_threads(pthread_t *w, pthread_attr_t thread_attr,
-			  struct cpu_map *cpu)
+			  struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -224,7 +224,7 @@ int bench_futex_wake_parallel(int argc, const char **argv)
 	struct sigaction act;
 	pthread_attr_t thread_attr;
 	struct thread_data *waking_worker;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options,
 			     bench_futex_wake_parallel_usage, 0);
tools/perf/bench/futex-wake.c +2 -2
index e8181ad7d088..2288fa8412ff 100644
@@ -90,7 +90,7 @@ static void print_summary(void)
 }
 
 static void block_threads(pthread_t *w,
-			  pthread_attr_t thread_attr, struct cpu_map *cpu)
+			  pthread_attr_t thread_attr, struct perf_cpu_map *cpu)
 {
 	cpu_set_t cpuset;
 	unsigned int i;
@@ -123,7 +123,7 @@ int bench_futex_wake(int argc, const char **argv)
 	unsigned int i, j;
 	struct sigaction act;
 	pthread_attr_t thread_attr;
-	struct cpu_map *cpu;
+	struct perf_cpu_map *cpu;
 
 	argc = parse_options(argc, argv, options, bench_futex_wake_usage, 0);
 	if (argc) {
tools/perf/builtin-c2c.c +1 -1
index e3776f5c2e01..52035dacf253 100644
@@ -2049,7 +2049,7 @@ static int setup_nodes(struct perf_session *session)
 	c2c.cpu2node = cpu2node;
 
 	for (node = 0; node < c2c.nodes_cnt; node++) {
-		struct cpu_map *map = n[node].map;
+		struct perf_cpu_map *map = n[node].map;
 		unsigned long *set;
 
 		set = bitmap_alloc(c2c.cpus_cnt);
tools/perf/builtin-ftrace.c +3 -3
index 66d5a6658daf..3e81e0b6628f 100644
@@ -165,7 +165,7 @@ static int set_tracing_pid(struct perf_ftrace *ftrace)
 	return 0;
 }
 
-static int set_tracing_cpumask(struct cpu_map *cpumap)
+static int set_tracing_cpumask(struct perf_cpu_map *cpumap)
 {
 	char *cpumask;
 	size_t mask_size;
@@ -192,7 +192,7 @@ static int set_tracing_cpumask(struct cpu_map *cpumap)
 
 static int set_tracing_cpu(struct perf_ftrace *ftrace)
 {
-	struct cpu_map *cpumap = ftrace->evlist->cpus;
+	struct perf_cpu_map *cpumap = ftrace->evlist->cpus;
 
 	if (!target__has_cpu(&ftrace->target))
 		return 0;
@@ -202,7 +202,7 @@ static int set_tracing_cpu(struct perf_ftrace *ftrace)
 
 static int reset_tracing_cpu(void)
 {
-	struct cpu_map *cpumap = cpu_map__new(NULL);
+	struct perf_cpu_map *cpumap = cpu_map__new(NULL);
 	int ret;
 
 	ret = set_tracing_cpumask(cpumap);
tools/perf/builtin-sched.c +4 -4
index 56d1907b1215..51dd48f20972 100644
@@ -161,9 +161,9 @@ struct perf_sched_map {
 	bool			 comp;
 	struct thread_map	*color_pids;
 	const char		*color_pids_str;
-	struct cpu_map		*color_cpus;
+	struct perf_cpu_map	*color_cpus;
 	const char		*color_cpus_str;
-	struct cpu_map		*cpus;
+	struct perf_cpu_map	*cpus;
 	const char		*cpus_str;
 };
 
@@ -3170,7 +3170,7 @@ static int perf_sched__lat(struct perf_sched *sched)
 
 static int setup_map_cpus(struct perf_sched *sched)
 {
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	sched->max_cpu  = sysconf(_SC_NPROCESSORS_CONF);
 
@@ -3212,7 +3212,7 @@ static int setup_color_pids(struct perf_sched *sched)
 
 static int setup_color_cpus(struct perf_sched *sched)
 {
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	if (!sched->map.color_cpus_str)
 		return 0;
tools/perf/builtin-script.c +1 -1
index 0140ddb8dd0b..0109c8710b93 100644
@@ -1627,7 +1627,7 @@ struct perf_script {
 	bool			show_bpf_events;
 	bool			allocated;
 	bool			per_event_dump;
-	struct cpu_map		*cpus;
+	struct perf_cpu_map	*cpus;
 	struct thread_map	*threads;
 	int			name_width;
 	const char              *time_str;
tools/perf/builtin-stat.c +23 -23

152 lines not on this page · raw message

tools/perf/tests/bitmap.c +1 -1
index 96e7fc1ad3f9..74d0cd32a5c4 100644
@@ -9,7 +9,7 @@
 
 static unsigned long *get_bitmap(const char *str, int nbits)
 {
-	struct cpu_map *map = cpu_map__new(str);
+	struct perf_cpu_map *map = cpu_map__new(str);
 	unsigned long *bm = NULL;
 	int i;
 
tools/perf/tests/code-reading.c +1 -1
index aa6df122b175..948ec278ad06 100644
@@ -553,7 +553,7 @@ static int do_test_code_reading(bool try_kcore)
 		.done_cnt = 0,
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
 	int err = -1, ret;
tools/perf/tests/cpumap.c +4 -4
index e78b897677bd..10da4400493d 100644
@@ -17,7 +17,7 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused,
 	struct cpu_map_event *map_event = &event->cpu_map;
 	struct cpu_map_mask *mask;
 	struct cpu_map_data *data;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	int i;
 
 	data = &map_event->data;
@@ -51,7 +51,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 	struct cpu_map_event *map_event = &event->cpu_map;
 	struct cpu_map_entries *cpus;
 	struct cpu_map_data *data;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	data = &map_event->data;
 
@@ -75,7 +75,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 
 int test__cpu_map_synthesize(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 
 	/* This one is better stores in mask. */
 	cpus = cpu_map__new("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19");
@@ -97,7 +97,7 @@ int test__cpu_map_synthesize(struct test *test __maybe_unused, int subtest __may
 
 static int cpu_map_print(const char *str)
 {
-	struct cpu_map *map = cpu_map__new(str);
+	struct perf_cpu_map *map = cpu_map__new(str);
 	char buf[100];
 
 	if (!map)
tools/perf/tests/event-times.c +2 -2
index 1a2686f1fcf0..ed90b62bf048 100644
@@ -110,7 +110,7 @@ static int detach__disable(struct perf_evlist *evlist)
 static int attach__cpu_disabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int err;
 
 	pr_debug("attaching to CPU 0 as enabled\n");
@@ -139,7 +139,7 @@ static int attach__cpu_disabled(struct perf_evlist *evlist)
 static int attach__cpu_enabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int err;
 
 	pr_debug("attaching to CPU 0 as enabled\n");
tools/perf/tests/event_update.c +1 -1
index f14dcd613438..b5042f019ec4 100644
@@ -61,7 +61,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 {
 	struct event_update_event *ev = (struct event_update_event*) event;
 	struct event_update_event_cpus *ev_data;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	ev_data = (struct event_update_event_cpus*) ev->data;
 
tools/perf/tests/keep-tracking.c +1 -1
index 17c46f3e6f1e..68331a81bcdd 100644
@@ -66,7 +66,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 		},
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
 	int found, err = -1;
tools/perf/tests/mem2node.c +1 -1
index 520cc91af256..e12eedfba781 100644
@@ -19,7 +19,7 @@ static struct node {
 
 static unsigned long *get_bitmap(const char *str, int nbits)
 {
-	struct cpu_map *map = cpu_map__new(str);
+	struct perf_cpu_map *map = cpu_map__new(str);
 	unsigned long *bm = NULL;
 	int i;
 
tools/perf/tests/mmap-basic.c +1 -1
index 0919b0793e5b..1bc8fd3ea510 100644
@@ -28,7 +28,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 	int err = -1;
 	union perf_event *event;
 	struct thread_map *threads;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct perf_evlist *evlist;
 	cpu_set_t cpu_set;
 	const char *syscall_names[] = { "getsid", "getppid", "getpgid", };
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
index 493ecb611540..f393aa836dfb 100644
@@ -20,7 +20,7 @@
 int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	int err = -1, fd, cpu;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct perf_evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
tools/perf/tests/sw-clock.c +1 -1
index f9490b237893..d9121b5033b7 100644
@@ -37,7 +37,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		.disabled = 1,
 		.freq = 1,
 	};
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 	struct perf_mmap *md;
 
tools/perf/tests/switch-tracking.c +1 -1
index 6cdab5f4812a..826f20a4cb51 100644
@@ -328,7 +328,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 		},
 	};
 	struct thread_map *threads = NULL;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
 	struct perf_evsel *switch_evsel, *tracking_evsel;
tools/perf/tests/task-exit.c +1 -1
index e92fa6029ac7..d66767be4c45 100644
@@ -45,7 +45,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
 	};
 	const char *argv[] = { "true", NULL };
 	char sbuf[STRERR_BUFSIZE];
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 	struct perf_mmap *md;
 
tools/perf/tests/topology.c +2 -2
index 9497d02f69e6..443d0272ebbd 100644
@@ -57,7 +57,7 @@ static int session_write_header(char *path)
 	return 0;
 }
 
-static int check_cpu_topology(char *path, struct cpu_map *map)
+static int check_cpu_topology(char *path, struct perf_cpu_map *map)
 {
 	struct perf_session *session;
 	struct perf_data data = {
@@ -116,7 +116,7 @@ static int check_cpu_topology(char *path, struct cpu_map *map)
 int test__session_topology(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	char path[PATH_MAX];
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	int ret = TEST_FAIL;
 
 	TEST_ASSERT_VAL("can't get templ file", !get_temp(path));
tools/perf/util/cpumap.c +39 -39

245 lines not on this page · raw message

tools/perf/util/cpumap.h +26 -26

84 lines not on this page · raw message

tools/perf/util/cputopo.c +2 -2
index 64336a280967..157b0988435e 100644
@@ -176,7 +176,7 @@ struct cpu_topology *cpu_topology__new(void)
 	size_t sz;
 	long ncpus;
 	int ret = -1;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	bool has_die = has_die_topology();
 
 	ncpus = cpu__max_present_cpu();
@@ -289,7 +289,7 @@ err:
 
 struct numa_topology *numa_topology__new(void)
 {
-	struct cpu_map *node_map = NULL;
+	struct perf_cpu_map *node_map = NULL;
 	struct numa_topology *tp = NULL;
 	char path[MAXPATHLEN];
 	char *buf = NULL;
tools/perf/util/env.h +1 -1
index d5d9865aa812..d8e083d42610 100644
@@ -27,7 +27,7 @@ struct numa_node {
 	u32		 node;
 	u64		 mem_total;
 	u64		 mem_free;
-	struct cpu_map	*map;
+	struct perf_cpu_map	*map;
 };
 
 struct memory_node {
tools/perf/util/event.c +9 -9
index f1f4848947ce..406ad8772907 100644
@@ -1008,7 +1008,7 @@ int perf_event__synthesize_thread_map2(struct perf_tool *tool,
 }
 
 static void synthesize_cpus(struct cpu_map_entries *cpus,
-			    struct cpu_map *map)
+			    struct perf_cpu_map *map)
 {
 	int i;
 
@@ -1019,7 +1019,7 @@ static void synthesize_cpus(struct cpu_map_entries *cpus,
 }
 
 static void synthesize_mask(struct cpu_map_mask *mask,
-			    struct cpu_map *map, int max)
+			    struct perf_cpu_map *map, int max)
 {
 	int i;
 
@@ -1030,12 +1030,12 @@ static void synthesize_mask(struct cpu_map_mask *mask,
 		set_bit(map->map[i], mask->mask);
 }
 
-static size_t cpus_size(struct cpu_map *map)
+static size_t cpus_size(struct perf_cpu_map *map)
 {
 	return sizeof(struct cpu_map_entries) + map->nr * sizeof(u16);
 }
 
-static size_t mask_size(struct cpu_map *map, int *max)
+static size_t mask_size(struct perf_cpu_map *map, int *max)
 {
 	int i;
 
@@ -1052,7 +1052,7 @@ static size_t mask_size(struct cpu_map *map, int *max)
 	return sizeof(struct cpu_map_mask) + BITS_TO_LONGS(*max) * sizeof(long);
 }
 
-void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max)
+void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max)
 {
 	size_t size_cpus, size_mask;
 	bool is_dummy = cpu_map__empty(map);
@@ -1086,7 +1086,7 @@ void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max
 	return zalloc(*size);
 }
 
-void cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map,
+void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map,
 			      u16 type, int max)
 {
 	data->type = type;
@@ -1102,7 +1102,7 @@ void cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map,
 	};
 }
 
-static struct cpu_map_event* cpu_map_event__new(struct cpu_map *map)
+static struct cpu_map_event* cpu_map_event__new(struct perf_cpu_map *map)
 {
 	size_t size = sizeof(struct cpu_map_event);
 	struct cpu_map_event *event;
@@ -1122,7 +1122,7 @@ static struct cpu_map_event* cpu_map_event__new(struct cpu_map *map)
 }
 
 int perf_event__synthesize_cpu_map(struct perf_tool *tool,
-				   struct cpu_map *map,
+				   struct perf_cpu_map *map,
 				   perf_event__handler_t process,
 				   struct machine *machine)
 {
@@ -1393,7 +1393,7 @@ size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp)
 
 size_t perf_event__fprintf_cpu_map(union perf_event *event, FILE *fp)
 {
-	struct cpu_map *cpus = cpu_map__new_data(&event->cpu_map.data);
+	struct perf_cpu_map *cpus = cpu_map__new_data(&event->cpu_map.data);
 	size_t ret;
 
 	ret = fprintf(fp, ": ");
tools/perf/util/event.h +4 -4
index 1f1da6082806..cafaac5128ab 100644
@@ -675,7 +675,7 @@ void perf_event__print_totals(void);
 
 struct perf_tool;
 struct thread_map;
-struct cpu_map;
+struct perf_cpu_map;
 struct perf_stat_config;
 struct perf_counts_values;
 
@@ -693,7 +693,7 @@ int perf_event__synthesize_thread_map2(struct perf_tool *tool,
 				      perf_event__handler_t process,
 				      struct machine *machine);
 int perf_event__synthesize_cpu_map(struct perf_tool *tool,
-				   struct cpu_map *cpus,
+				   struct perf_cpu_map *cpus,
 				   perf_event__handler_t process,
 				   struct machine *machine);
 int perf_event__synthesize_threads(struct perf_tool *tool,
@@ -844,8 +844,8 @@ size_t perf_event__fprintf(union perf_event *event, FILE *fp);
 int kallsyms__get_function_start(const char *kallsyms_filename,
 				 const char *symbol_name, u64 *addr);
 
-void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max);
-void  cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map,
+void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max);
+void  cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map,
 			       u16 type, int max);
 
 void event_attr_init(struct perf_event_attr *attr);
tools/perf/util/evlist.c +5 -5
index b0364d923f76..bce883eaf0dc 100644
@@ -41,7 +41,7 @@ int sigqueue(pid_t pid, int sig, const union sigval value);
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
-void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 		       struct thread_map *threads)
 {
 	int i;
@@ -1012,7 +1012,7 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
 			 int comp_level)
 {
 	struct perf_evsel *evsel;
-	const struct cpu_map *cpus = evlist->cpus;
+	const struct perf_cpu_map *cpus = evlist->cpus;
 	const struct thread_map *threads = evlist->threads;
 	/*
 	 * Delay setting mp.prot: set it before calling perf_mmap__mmap.
@@ -1058,7 +1058,7 @@ int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
 int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 {
 	bool all_threads = (target->per_thread && target->system_wide);
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 
 	/*
@@ -1104,7 +1104,7 @@ out_delete_threads:
 	return -1;
 }
 
-void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 			   struct thread_map *threads)
 {
 	/*
@@ -1358,7 +1358,7 @@ void perf_evlist__close(struct perf_evlist *evlist)
 
 static int perf_evlist__create_syswide_maps(struct perf_evlist *evlist)
 {
-	struct cpu_map	  *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 	int err = -ENOMEM;
 
tools/perf/util/evlist.h +4 -4
index 49354fe24d5f..c8cda300b584 100644
@@ -18,7 +18,7 @@
 
 struct pollfd;
 struct thread_map;
-struct cpu_map;
+struct perf_cpu_map;
 struct record_opts;
 
 #define PERF_EVLIST__HLIST_BITS 8
@@ -45,7 +45,7 @@ struct perf_evlist {
 	struct perf_mmap *mmap;
 	struct perf_mmap *overwrite_mmap;
 	struct thread_map *threads;
-	struct cpu_map	  *cpus;
+	struct perf_cpu_map *cpus;
 	struct perf_evsel *selected;
 	struct events_stats stats;
 	struct perf_env	*env;
@@ -68,7 +68,7 @@ struct perf_evsel_str_handler {
 struct perf_evlist *perf_evlist__new(void);
 struct perf_evlist *perf_evlist__new_default(void);
 struct perf_evlist *perf_evlist__new_dummy(void);
-void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 		       struct thread_map *threads);
 void perf_evlist__exit(struct perf_evlist *evlist);
 void perf_evlist__delete(struct perf_evlist *evlist);
@@ -194,7 +194,7 @@ int perf_evlist__enable_event_idx(struct perf_evlist *evlist,
 void perf_evlist__set_selected(struct perf_evlist *evlist,
 			       struct perf_evsel *evsel);
 
-void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus,
+void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
 			   struct thread_map *threads);
 int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target);
 int perf_evlist__apply_filters(struct perf_evlist *evlist, struct perf_evsel **err_evsel);
tools/perf/util/evsel.c +4 -4
index d23b9574f793..958206c538c3 100644
@@ -1825,7 +1825,7 @@ static int perf_event_open(struct perf_evsel *evsel,
 	return fd;
 }
 
-int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
+int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
 		     struct thread_map *threads)
 {
 	int cpu, thread, nthreads;
@@ -1837,7 +1837,7 @@ int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 		return -EINVAL;
 
 	if (cpus == NULL) {
-		static struct cpu_map *empty_cpu_map;
+		static struct perf_cpu_map *empty_cpu_map;
 
 		if (empty_cpu_map == NULL) {
 			empty_cpu_map = cpu_map__dummy_new();
@@ -2084,7 +2084,7 @@ void perf_evsel__close(struct perf_evsel *evsel)
 }
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
-			     struct cpu_map *cpus)
+			     struct perf_cpu_map *cpus)
 {
 	return perf_evsel__open(evsel, cpus, NULL);
 }
@@ -3064,7 +3064,7 @@ static int store_evsel_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 
 int perf_evsel__store_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 {
-	struct cpu_map *cpus = evsel->cpus;
+	struct perf_cpu_map *cpus = evsel->cpus;
 	struct thread_map *threads = evsel->threads;
 
 	if (perf_evsel__alloc_id(evsel, cpus->nr, threads->nr))
tools/perf/util/evsel.h +6 -6
index b27935a6d36c..76b14037f260 100644
@@ -124,8 +124,8 @@ struct perf_evsel {
 	u64			db_id;
 	struct cgroup		*cgrp;
 	void			*handler;
-	struct cpu_map		*cpus;
-	struct cpu_map		*own_cpus;
+	struct perf_cpu_map	*cpus;
+	struct perf_cpu_map	*own_cpus;
 	struct thread_map	*threads;
 	unsigned int		sample_size;
 	int			id_pos;
@@ -192,12 +192,12 @@ struct perf_missing_features {
 
 extern struct perf_missing_features perf_missing_features;
 
-struct cpu_map;
+struct perf_cpu_map;
 struct target;
 struct thread_map;
 struct record_opts;
 
-static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
+static inline struct perf_cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
 {
 	return evsel->cpus;
 }
@@ -300,10 +300,10 @@ int perf_evsel__enable(struct perf_evsel *evsel);
 int perf_evsel__disable(struct perf_evsel *evsel);
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
-			     struct cpu_map *cpus);
+			     struct perf_cpu_map *cpus);
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
 				struct thread_map *threads);
-int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
+int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
 		     struct thread_map *threads);
 void perf_evsel__close(struct perf_evsel *evsel);
 
tools/perf/util/header.c +2 -2
index 1903d7ec9797..4be216f3598b 100644
@@ -3886,7 +3886,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp)
 	struct event_update_event *ev = &event->event_update;
 	struct event_update_event_scale *ev_scale;
 	struct event_update_event_cpus *ev_cpus;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 	size_t ret;
 
 	ret = fprintf(fp, "\n... id:    %" PRIu64 "\n", ev->id);
@@ -4054,7 +4054,7 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused,
 	struct event_update_event_cpus *ev_cpus;
 	struct perf_evlist *evlist;
 	struct perf_evsel *evsel;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	if (!pevlist || *pevlist == NULL)
 		return -EINVAL;
tools/perf/util/mmap.c +1 -1
index 9f0b6391af33..177c41fc9842 100644
@@ -325,7 +325,7 @@ void perf_mmap__munmap(struct perf_mmap *map)
 static void build_node_mask(int node, cpu_set_t *mask)
 {
 	int c, cpu, nr_cpus;
-	const struct cpu_map *cpu_map = NULL;
+	const struct perf_cpu_map *cpu_map = NULL;
 
 	cpu_map = cpu_map__online();
 	if (!cpu_map)
tools/perf/util/parse-events.c +1 -1
index 0540303e5e97..077509609d03 100644
@@ -322,7 +322,7 @@ __add_event(struct list_head *list, int *idx,
 	    const char *cpu_list)
 {
 	struct perf_evsel *evsel;
-	struct cpu_map *cpus = pmu ? pmu->cpus :
+	struct perf_cpu_map *cpus = pmu ? pmu->cpus :
 			       cpu_list ? cpu_map__new(cpu_list) : NULL;
 
 	event_attr_init(attr);
tools/perf/util/pmu.c +5 -5
index f32b710347db..4929a50c0973 100644
@@ -572,10 +572,10 @@ static void pmu_read_sysfs(void)
 	closedir(dir);
 }
 
-static struct cpu_map *__pmu_cpumask(const char *path)
+static struct perf_cpu_map *__pmu_cpumask(const char *path)
 {
 	FILE *file;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 
 	file = fopen(path, "r");
 	if (!file)
@@ -593,10 +593,10 @@ static struct cpu_map *__pmu_cpumask(const char *path)
 #define CPUS_TEMPLATE_UNCORE	"%s/bus/event_source/devices/%s/cpumask"
 #define CPUS_TEMPLATE_CPU	"%s/bus/event_source/devices/%s/cpus"
 
-static struct cpu_map *pmu_cpumask(const char *name)
+static struct perf_cpu_map *pmu_cpumask(const char *name)
 {
 	char path[PATH_MAX];
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	const char *sysfs = sysfs__mountpoint();
 	const char *templates[] = {
 		CPUS_TEMPLATE_UNCORE,
@@ -621,7 +621,7 @@ static struct cpu_map *pmu_cpumask(const char *name)
 static bool pmu_is_uncore(const char *name)
 {
 	char path[PATH_MAX];
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	const char *sysfs = sysfs__mountpoint();
 
 	snprintf(path, PATH_MAX, CPUS_TEMPLATE_UNCORE, sysfs, name);
tools/perf/util/pmu.h +1 -1
index bd9ec2704a57..3f8b79b1dd85 100644
@@ -28,7 +28,7 @@ struct perf_pmu {
 	bool is_uncore;
 	int max_precise;
 	struct perf_event_attr *default_config;
-	struct cpu_map *cpus;
+	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 list;    /* ELEM */
tools/perf/util/python.c +3 -3
index 1e5b6718dcea..be27956ae080 100644
@@ -536,7 +536,7 @@ static PyObject *pyrf_event__new(union perf_event *event)
 struct pyrf_cpu_map {
 	PyObject_HEAD
 
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 };
 
 static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus,
@@ -796,7 +796,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
 				  PyObject *args, PyObject *kwargs)
 {
 	struct perf_evsel *evsel = &pevsel->evsel;
-	struct cpu_map *cpus = NULL;
+	struct perf_cpu_map *cpus = NULL;
 	struct thread_map *threads = NULL;
 	PyObject *pcpus = NULL, *pthreads = NULL;
 	int group = 0, inherit = 0;
@@ -865,7 +865,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist,
 			     PyObject *args, PyObject *kwargs __maybe_unused)
 {
 	PyObject *pcpus = NULL, *pthreads = NULL;
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	struct thread_map *threads;
 
 	if (!PyArg_ParseTuple(args, "OO", &pcpus, &pthreads))
tools/perf/util/record.c +3 -3
index 9cfc7bf16531..051c67f82548 100644
@@ -60,7 +60,7 @@ out_delete:
 static bool perf_probe_api(setup_probe_fn_t fn)
 {
 	const char *try[] = {"cycles:u", "instructions:u", "cpu-clock:u", NULL};
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int cpu, ret, i = 0;
 
 	cpus = cpu_map__new(NULL);
@@ -115,7 +115,7 @@ bool perf_can_record_cpu_wide(void)
 		.config = PERF_COUNT_SW_CPU_CLOCK,
 		.exclude_kernel = 1,
 	};
-	struct cpu_map *cpus;
+	struct perf_cpu_map *cpus;
 	int cpu, fd;
 
 	cpus = cpu_map__new(NULL);
@@ -275,7 +275,7 @@ bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str)
 	evsel = perf_evlist__last(temp_evlist);
 
 	if (!evlist || cpu_map__empty(evlist->cpus)) {
-		struct cpu_map *cpus = cpu_map__new(NULL);
+		struct perf_cpu_map *cpus = cpu_map__new(NULL);
 
 		cpu =  cpus ? cpus->map[0] : 0;
 		cpu_map__put(cpus);
tools/perf/util/scripting-engines/trace-event-python.c +1 -1
index 25dc1d765553..a53b30b8819b 100644
@@ -1393,7 +1393,7 @@ static void python_process_stat(struct perf_stat_config *config,
 				struct perf_evsel *counter, u64 tstamp)
 {
 	struct thread_map *threads = counter->threads;
-	struct cpu_map *cpus = counter->cpus;
+	struct perf_cpu_map *cpus = counter->cpus;
 	int cpu, thread;
 
 	if (config->aggr_mode == AGGR_GLOBAL) {
tools/perf/util/session.c +1 -1
index 37efa1f43d8b..69d1d158a610 100644
@@ -2273,7 +2273,7 @@ int perf_session__cpu_bitmap(struct perf_session *session,
 			     const char *cpu_list, unsigned long *cpu_bitmap)
 {
 	int i, err = -1;
-	struct cpu_map *map;
+	struct perf_cpu_map *map;
 
 	for (i = 0; i < PERF_TYPE_MAX; ++i) {
 		struct perf_evsel *evsel;
tools/perf/util/stat.c +1 -1
index db8a6cf336be..62791c063f7a 100644
@@ -215,7 +215,7 @@ static int check_per_pkg(struct perf_evsel *counter,
 			 struct perf_counts_values *vals, int cpu, bool *skip)
 {
 	unsigned long *mask = counter->per_pkg_mask;
-	struct cpu_map *cpus = perf_evsel__cpus(counter);
+	struct perf_cpu_map *cpus = perf_evsel__cpus(counter);
 	int s;
 
 	*skip = false;
tools/perf/util/stat.h +3 -3
index 7032dd1eeac2..fa675d09febd 100644
@@ -92,7 +92,7 @@ struct runtime_stat {
 };
 
 typedef int (*aggr_get_id_t)(struct perf_stat_config *config,
-			     struct cpu_map *m, int cpu);
+			     struct perf_cpu_map *m, int cpu);
 
 struct perf_stat_config {
 	enum aggr_mode		 aggr_mode;
@@ -122,9 +122,9 @@ struct perf_stat_config {
 	const char		*csv_sep;
 	struct stats		*walltime_nsecs_stats;
 	struct rusage		 ru_data;
-	struct cpu_map		*aggr_map;
+	struct perf_cpu_map		*aggr_map;
 	aggr_get_id_t		 aggr_get_id;
-	struct cpu_map		*cpus_aggr_map;
+	struct perf_cpu_map		*cpus_aggr_map;
 	u64			*walltime_run;
 	struct rblist		 metric_events;
 };
tools/perf/util/svghelper.c +1 -1
index 76cc54000483..99132c6a30a6 100644
@@ -728,7 +728,7 @@ static int str_to_bitmap(char *s, cpumask_t *b)
 {
 	int i;
 	int ret = 0;
-	struct cpu_map *m;
+	struct perf_cpu_map *m;
 	int c;
 
 	m = cpu_map__new(s);
author reviewer
#5 lore raw

PATCH 3/79 perf tools: Rename struct thread_map to struct perf_thread_map

In reply to Jiri Olsa

Renaming struct thread_map to struct perf_thread_map, so it could be part of libperf.

---
 tools/perf/arch/x86/tests/perf-time-to-tsc.c  |  2 +-
 tools/perf/builtin-record.c                   |  2 +-
 tools/perf/builtin-sched.c                    |  4 +-
 tools/perf/builtin-script.c                   |  2 +-
 tools/perf/builtin-stat.c                     |  4 +-
 tools/perf/tests/code-reading.c               |  2 +-
 tools/perf/tests/event-times.c                |  4 +-
 tools/perf/tests/keep-tracking.c              |  2 +-
 tools/perf/tests/mmap-basic.c                 |  2 +-
 tools/perf/tests/mmap-thread-lookup.c         |  2 +-
 tools/perf/tests/openat-syscall-all-cpus.c    |  2 +-
 tools/perf/tests/openat-syscall.c             |  2 +-
 tools/perf/tests/sw-clock.c                   |  2 +-
 tools/perf/tests/switch-tracking.c            |  2 +-
 tools/perf/tests/task-exit.c                  |  2 +-
 tools/perf/tests/thread-map.c                 |  8 +--
 tools/perf/util/event.c                       |  6 +-
 tools/perf/util/event.h                       |  6 +-
 tools/perf/util/evlist.c                      | 10 ++--
 tools/perf/util/evlist.h                      |  6 +-
 tools/perf/util/evsel.c                       | 10 ++--
 tools/perf/util/evsel.h                       |  6 +-
 tools/perf/util/machine.c                     |  2 +-
 tools/perf/util/machine.h                     |  4 +-
 tools/perf/util/parse-events.c                |  2 +-
 tools/perf/util/python.c                      |  6 +-
 .../scripting-engines/trace-event-python.c    |  2 +-
 tools/perf/util/thread_map.c                  | 60 +++++++++----------
 tools/perf/util/thread_map.h                  | 40 ++++++-------
 29 files changed, 102 insertions(+), 102 deletions(-)
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index 4676fd967dc6..f542b878bdb5 100644
@@ -49,7 +49,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 		},
 		.sample_time	     = true,
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
tools/perf/builtin-record.c +1 -1
index 8779cee58185..bcfc16450608 100644
@@ -1047,7 +1047,7 @@ record__finish_output(struct record *rec)
 static int record__synthesize_workload(struct record *rec, bool tail)
 {
 	int err;
-	struct thread_map *thread_map;
+	struct perf_thread_map *thread_map;
 
 	if (rec->opts.tail_synthesize != tail)
 		return 0;
tools/perf/builtin-sched.c +2 -2
index 51dd48f20972..ac6a0c5d6d6b 100644
@@ -159,7 +159,7 @@ struct perf_sched_map {
 	DECLARE_BITMAP(comp_cpus_mask, MAX_CPUS);
 	int			*comp_cpus;
 	bool			 comp;
-	struct thread_map	*color_pids;
+	struct perf_thread_map *color_pids;
 	const char		*color_pids_str;
 	struct perf_cpu_map	*color_cpus;
 	const char		*color_cpus_str;
@@ -3195,7 +3195,7 @@ static int setup_map_cpus(struct perf_sched *sched)
 
 static int setup_color_pids(struct perf_sched *sched)
 {
-	struct thread_map *map;
+	struct perf_thread_map *map;
 
 	if (!sched->map.color_pids_str)
 		return 0;
tools/perf/builtin-script.c +1 -1
index 0109c8710b93..fccc960df92b 100644
@@ -1628,7 +1628,7 @@ struct perf_script {
 	bool			allocated;
 	bool			per_event_dump;
 	struct perf_cpu_map	*cpus;
-	struct thread_map	*threads;
+	struct perf_thread_map *threads;
 	int			name_width;
 	const char              *time_str;
 	struct perf_time_interval *ptime_range;
tools/perf/builtin-stat.c +2 -2
index d68738b5bd0c..2b9518a38baf 100644
@@ -165,7 +165,7 @@ struct perf_stat {
 	struct perf_tool	 tool;
 	bool			 maps_allocated;
 	struct perf_cpu_map	*cpus;
-	struct thread_map	*threads;
+	struct perf_thread_map *threads;
 	enum aggr_mode		 aggr_mode;
 };
 
@@ -395,7 +395,7 @@ static bool perf_evsel__should_store_id(struct perf_evsel *counter)
 }
 
 static bool is_target_alive(struct target *_target,
-			    struct thread_map *threads)
+			    struct perf_thread_map *threads)
 {
 	struct stat st;
 	int i;
tools/perf/tests/code-reading.c +1 -1
index 948ec278ad06..88c218eacc43 100644
@@ -552,7 +552,7 @@ static int do_test_code_reading(bool try_kcore)
 	struct state state = {
 		.done_cnt = 0,
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
tools/perf/tests/event-times.c +2 -2
index ed90b62bf048..684ad56f7b0f 100644
@@ -57,7 +57,7 @@ static int detach__enable_on_exec(struct perf_evlist *evlist)
 static int attach__current_disabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	int err;
 
 	pr_debug("attaching to current thread as disabled\n");
@@ -83,7 +83,7 @@ static int attach__current_disabled(struct perf_evlist *evlist)
 static int attach__current_enabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	int err;
 
 	pr_debug("attaching to current thread as enabled\n");
tools/perf/tests/keep-tracking.c +1 -1
index 68331a81bcdd..e1e5e32cbb53 100644
@@ -65,7 +65,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 			.uses_mmap   = true,
 		},
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
tools/perf/tests/mmap-basic.c +1 -1
index 1bc8fd3ea510..c1e2fe087b67 100644
@@ -27,7 +27,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 {
 	int err = -1;
 	union perf_event *event;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_cpu_map *cpus;
 	struct perf_evlist *evlist;
 	cpu_set_t cpu_set;
tools/perf/tests/mmap-thread-lookup.c +1 -1
index 0a4301a5155c..ad6ca943e568 100644
@@ -138,7 +138,7 @@ static int synth_all(struct machine *machine)
 
 static int synth_process(struct machine *machine)
 {
-	struct thread_map *map;
+	struct perf_thread_map *map;
 	int err;
 
 	map = thread_map__new_by_pid(getpid());
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
index f393aa836dfb..9cd5bf63bec1 100644
@@ -24,7 +24,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
 	struct perf_evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
-	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
+	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
 	char errbuf[BUFSIZ];
 
tools/perf/tests/openat-syscall.c +1 -1
index 00cd63f90b92..652b8328ca93 100644
@@ -16,7 +16,7 @@ int test__openat_syscall_event(struct test *test __maybe_unused, int subtest __m
 	int err = -1, fd;
 	struct perf_evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
-	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
+	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
 	char errbuf[BUFSIZ];
 
tools/perf/tests/sw-clock.c +1 -1
index d9121b5033b7..d57b8d9c1575 100644
@@ -38,7 +38,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		.freq = 1,
 	};
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_mmap *md;
 
 	attr.sample_freq = 500;
tools/perf/tests/switch-tracking.c +1 -1
index 826f20a4cb51..3652c548cc22 100644
@@ -327,7 +327,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 			.uses_mmap   = true,
 		},
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
tools/perf/tests/task-exit.c +1 -1
index d66767be4c45..9602ff91a3c7 100644
@@ -46,7 +46,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
 	const char *argv[] = { "true", NULL };
 	char sbuf[STRERR_BUFSIZE];
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_mmap *md;
 
 	signal(SIGCHLD, sig_handler);
tools/perf/tests/thread-map.c +4 -4
index ccc17aced49e..367dfe708e4c 100644
@@ -13,7 +13,7 @@
 
 int test__thread_map(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct thread_map *map;
+	struct perf_thread_map *map;
 
 	TEST_ASSERT_VAL("failed to set process name",
 			!prctl(PR_SET_NAME, NAMEUL, 0, 0, 0));
@@ -57,7 +57,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,
 			 struct machine *machine __maybe_unused)
 {
 	struct thread_map_event *map = &event->thread_map;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	TEST_ASSERT_VAL("wrong nr",   map->nr == 1);
 	TEST_ASSERT_VAL("wrong pid",  map->entries[0].pid == (u64) getpid());
@@ -80,7 +80,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,
 
 int test__thread_map_synthesize(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	TEST_ASSERT_VAL("failed to set process name",
 			!prctl(PR_SET_NAME, NAMEUL, 0, 0, 0));
@@ -99,7 +99,7 @@ int test__thread_map_synthesize(struct test *test __maybe_unused, int subtest __
 
 int test__thread_map_remove(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	char *str;
 	int i;
 
tools/perf/util/event.c +3 -3
index 406ad8772907..f78837788b14 100644
@@ -616,7 +616,7 @@ static int __event__synthesize_thread(union perf_event *comm_event,
 }
 
 int perf_event__synthesize_thread_map(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine,
 				      bool mmap_data)
@@ -972,7 +972,7 @@ int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
 }
 
 int perf_event__synthesize_thread_map2(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine)
 {
@@ -1377,7 +1377,7 @@ size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp)
 
 size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp)
 {
-	struct thread_map *threads = thread_map__new_event(&event->thread_map);
+	struct perf_thread_map *threads = thread_map__new_event(&event->thread_map);
 	size_t ret;
 
 	ret = fprintf(fp, " nr: ");
tools/perf/util/event.h +3 -3
index cafaac5128ab..70841d115349 100644
@@ -674,7 +674,7 @@ union perf_event {
 void perf_event__print_totals(void);
 
 struct perf_tool;
-struct thread_map;
+struct perf_thread_map;
 struct perf_cpu_map;
 struct perf_stat_config;
 struct perf_counts_values;
@@ -685,11 +685,11 @@ typedef int (*perf_event__handler_t)(struct perf_tool *tool,
 				     struct machine *machine);
 
 int perf_event__synthesize_thread_map(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine, bool mmap_data);
 int perf_event__synthesize_thread_map2(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine);
 int perf_event__synthesize_cpu_map(struct perf_tool *tool,
tools/perf/util/evlist.c +5 -5
index bce883eaf0dc..a95d0461f718 100644
@@ -42,7 +42,7 @@ int sigqueue(pid_t pid, int sig, const union sigval value);
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
 void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-		       struct thread_map *threads)
+		       struct perf_thread_map *threads)
 {
 	int i;
 
@@ -1013,7 +1013,7 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
 {
 	struct perf_evsel *evsel;
 	const struct perf_cpu_map *cpus = evlist->cpus;
-	const struct thread_map *threads = evlist->threads;
+	const struct perf_thread_map *threads = evlist->threads;
 	/*
 	 * Delay setting mp.prot: set it before calling perf_mmap__mmap.
 	 * Its value is decided by evsel's write_backward.
@@ -1059,7 +1059,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 {
 	bool all_threads = (target->per_thread && target->system_wide);
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	/*
 	 * If specify '-a' and '--per-thread' to perf record, perf record
@@ -1105,7 +1105,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 }
 
 void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-			   struct thread_map *threads)
+			   struct perf_thread_map *threads)
 {
 	/*
 	 * Allow for the possibility that one or another of the maps isn't being
@@ -1359,7 +1359,7 @@ void perf_evlist__close(struct perf_evlist *evlist)
 static int perf_evlist__create_syswide_maps(struct perf_evlist *evlist)
 {
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	int err = -ENOMEM;
 
 	/*
tools/perf/util/evlist.h +3 -3
index c8cda300b584..ab2f0b6c7640 100644
@@ -44,7 +44,7 @@ struct perf_evlist {
 	struct fdarray	 pollfd;
 	struct perf_mmap *mmap;
 	struct perf_mmap *overwrite_mmap;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_cpu_map *cpus;
 	struct perf_evsel *selected;
 	struct events_stats stats;
@@ -69,7 +69,7 @@ struct perf_evlist *perf_evlist__new(void);
 struct perf_evlist *perf_evlist__new_default(void);
 struct perf_evlist *perf_evlist__new_dummy(void);
 void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-		       struct thread_map *threads);
+		       struct perf_thread_map *threads);
 void perf_evlist__exit(struct perf_evlist *evlist);
 void perf_evlist__delete(struct perf_evlist *evlist);
 
@@ -195,7 +195,7 @@ void perf_evlist__set_selected(struct perf_evlist *evlist,
 			       struct perf_evsel *evsel);
 
 void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-			   struct thread_map *threads);
+			   struct perf_thread_map *threads);
 int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target);
 int perf_evlist__apply_filters(struct perf_evlist *evlist, struct perf_evsel **err_evsel);
 
tools/perf/util/evsel.c +5 -5
index 958206c538c3..ab66d65b7968 100644
@@ -1743,7 +1743,7 @@ static int update_fds(struct perf_evsel *evsel,
 
 static bool ignore_missing_thread(struct perf_evsel *evsel,
 				  int nr_cpus, int cpu,
-				  struct thread_map *threads,
+				  struct perf_thread_map *threads,
 				  int thread, int err)
 {
 	pid_t ignore_pid = thread_map__pid(threads, thread);
@@ -1826,7 +1826,7 @@ static int perf_event_open(struct perf_evsel *evsel,
 }
 
 int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
-		     struct thread_map *threads)
+		     struct perf_thread_map *threads)
 {
 	int cpu, thread, nthreads;
 	unsigned long flags = PERF_FLAG_FD_CLOEXEC;
@@ -1849,7 +1849,7 @@ int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
 	}
 
 	if (threads == NULL) {
-		static struct thread_map *empty_thread_map;
+		static struct perf_thread_map *empty_thread_map;
 
 		if (empty_thread_map == NULL) {
 			empty_thread_map = thread_map__new_by_tid(-1);
@@ -2090,7 +2090,7 @@ int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
 }
 
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
-				struct thread_map *threads)
+				struct perf_thread_map *threads)
 {
 	return perf_evsel__open(evsel, NULL, threads);
 }
@@ -3065,7 +3065,7 @@ static int store_evsel_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 int perf_evsel__store_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 {
 	struct perf_cpu_map *cpus = evsel->cpus;
-	struct thread_map *threads = evsel->threads;
+	struct perf_thread_map *threads = evsel->threads;
 
 	if (perf_evsel__alloc_id(evsel, cpus->nr, threads->nr))
 		return -ENOMEM;
tools/perf/util/evsel.h +3 -3
index 76b14037f260..ba2385f22e28 100644
@@ -126,7 +126,7 @@ struct perf_evsel {
 	void			*handler;
 	struct perf_cpu_map	*cpus;
 	struct perf_cpu_map	*own_cpus;
-	struct thread_map	*threads;
+	struct perf_thread_map *threads;
 	unsigned int		sample_size;
 	int			id_pos;
 	int			is_pos;
@@ -302,9 +302,9 @@ int perf_evsel__disable(struct perf_evsel *evsel);
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
 			     struct perf_cpu_map *cpus);
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
-				struct thread_map *threads);
+				struct perf_thread_map *threads);
 int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
-		     struct thread_map *threads);
+		     struct perf_thread_map *threads);
 void perf_evsel__close(struct perf_evsel *evsel);
 
 struct perf_sample;
tools/perf/util/machine.c +1 -1
index cf826eca3aaf..a2359a33c748 100644
@@ -2599,7 +2599,7 @@ int machines__for_each_thread(struct machines *machines,
 }
 
 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				  struct target *target, struct thread_map *threads,
+				  struct target *target, struct perf_thread_map *threads,
 				  perf_event__handler_t process, bool data_mmap,
 				  unsigned int nr_threads_synthesize)
 {
tools/perf/util/machine.h +2 -2
index f70ab98a7bde..7f64016758e0 100644
@@ -251,12 +251,12 @@ int machines__for_each_thread(struct machines *machines,
 			      void *priv);
 
 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				  struct target *target, struct thread_map *threads,
+				  struct target *target, struct perf_thread_map *threads,
 				  perf_event__handler_t process, bool data_mmap,
 				  unsigned int nr_threads_synthesize);
 static inline
 int machine__synthesize_threads(struct machine *machine, struct target *target,
-				struct thread_map *threads, bool data_mmap,
+				struct perf_thread_map *threads, bool data_mmap,
 				unsigned int nr_threads_synthesize)
 {
 	return __machine__synthesize_threads(machine, NULL, target, threads,
tools/perf/util/parse-events.c +1 -1
index 077509609d03..352c5198b453 100644
@@ -2313,7 +2313,7 @@ static bool is_event_supported(u8 type, unsigned config)
 		.config = config,
 		.disabled = 1,
 	};
-	struct thread_map *tmap = thread_map__new_by_tid(0);
+	struct perf_thread_map *tmap = thread_map__new_by_tid(0);
 
 	if (tmap == NULL)
 		return false;
tools/perf/util/python.c +3 -3
index be27956ae080..62dda70227e5 100644
@@ -605,7 +605,7 @@ static int pyrf_cpu_map__setup_types(void)
 struct pyrf_thread_map {
 	PyObject_HEAD
 
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 };
 
 static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads,
@@ -797,7 +797,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
 {
 	struct perf_evsel *evsel = &pevsel->evsel;
 	struct perf_cpu_map *cpus = NULL;
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	PyObject *pcpus = NULL, *pthreads = NULL;
 	int group = 0, inherit = 0;
 	static char *kwlist[] = { "cpus", "threads", "group", "inherit", NULL };
@@ -866,7 +866,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist,
 {
 	PyObject *pcpus = NULL, *pthreads = NULL;
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	if (!PyArg_ParseTuple(args, "OO", &pcpus, &pthreads))
 		return -1;
tools/perf/util/scripting-engines/trace-event-python.c +1 -1
index a53b30b8819b..0a7e662036b4 100644
@@ -1392,7 +1392,7 @@ process_stat(struct perf_evsel *counter, int cpu, int thread, u64 tstamp,
 static void python_process_stat(struct perf_stat_config *config,
 				struct perf_evsel *counter, u64 tstamp)
 {
-	struct thread_map *threads = counter->threads;
+	struct perf_thread_map *threads = counter->threads;
 	struct perf_cpu_map *cpus = counter->cpus;
 	int cpu, thread;
 
tools/perf/util/thread_map.c +30 -30

204 lines not on this page · raw message

tools/perf/util/thread_map.h +20 -20
index 2f689c90a8c6..9358b1b6e657 100644
@@ -11,7 +11,7 @@ struct thread_map_data {
 	char	*comm;
 };
 
-struct thread_map {
+struct perf_thread_map {
 	refcount_t refcnt;
 	int nr;
 	int err_thread;
@@ -20,46 +20,46 @@ struct thread_map {
 
 struct thread_map_event;
 
-struct thread_map *thread_map__new_dummy(void);
-struct thread_map *thread_map__new_by_pid(pid_t pid);
-struct thread_map *thread_map__new_by_tid(pid_t tid);
-struct thread_map *thread_map__new_by_uid(uid_t uid);
-struct thread_map *thread_map__new_all_cpus(void);
-struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid);
-struct thread_map *thread_map__new_event(struct thread_map_event *event);
+struct perf_thread_map *thread_map__new_dummy(void);
+struct perf_thread_map *thread_map__new_by_pid(pid_t pid);
+struct perf_thread_map *thread_map__new_by_tid(pid_t tid);
+struct perf_thread_map *thread_map__new_by_uid(uid_t uid);
+struct perf_thread_map *thread_map__new_all_cpus(void);
+struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid);
+struct perf_thread_map *thread_map__new_event(struct thread_map_event *event);
 
-struct thread_map *thread_map__get(struct thread_map *map);
-void thread_map__put(struct thread_map *map);
+struct perf_thread_map *thread_map__get(struct perf_thread_map *map);
+void thread_map__put(struct perf_thread_map *map);
 
-struct thread_map *thread_map__new_str(const char *pid,
+struct perf_thread_map *thread_map__new_str(const char *pid,
 		const char *tid, uid_t uid, bool all_threads);
 
-struct thread_map *thread_map__new_by_tid_str(const char *tid_str);
+struct perf_thread_map *thread_map__new_by_tid_str(const char *tid_str);
 
-size_t thread_map__fprintf(struct thread_map *threads, FILE *fp);
+size_t thread_map__fprintf(struct perf_thread_map *threads, FILE *fp);
 
-static inline int thread_map__nr(struct thread_map *threads)
+static inline int thread_map__nr(struct perf_thread_map *threads)
 {
 	return threads ? threads->nr : 1;
 }
 
-static inline pid_t thread_map__pid(struct thread_map *map, int thread)
+static inline pid_t thread_map__pid(struct perf_thread_map *map, int thread)
 {
 	return map->map[thread].pid;
 }
 
 static inline void
-thread_map__set_pid(struct thread_map *map, int thread, pid_t pid)
+thread_map__set_pid(struct perf_thread_map *map, int thread, pid_t pid)
 {
 	map->map[thread].pid = pid;
 }
 
-static inline char *thread_map__comm(struct thread_map *map, int thread)
+static inline char *thread_map__comm(struct perf_thread_map *map, int thread)
 {
 	return map->map[thread].comm;
 }
 
-void thread_map__read_comms(struct thread_map *threads);
-bool thread_map__has(struct thread_map *threads, pid_t pid);
-int thread_map__remove(struct thread_map *threads, int idx);
+void thread_map__read_comms(struct perf_thread_map *threads);
+bool thread_map__has(struct perf_thread_map *threads, pid_t pid);
+int thread_map__remove(struct perf_thread_map *threads, int idx);
 #endif	/* __PERF_THREAD_MAP_H */
Signature · 1 line
2.21.0
#6 lore raw

[tip:perf/core] perf tools: Rename struct thread_map to struct perf_thread_map

perf tools: Rename struct thread_map to struct perf_thread_map
Commit-ID:  9749b90e566ca1a235fc8e2118f99c5690969342
Gitweb:     https://git.kernel.org/tip/9749b90e566ca1a235fc8e2118f99c5690969342
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:50 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf tools: Rename struct thread_map to struct perf_thread_map

Rename struct thread_map to struct perf_thread_map, so it could be part of libperf.

---
 tools/perf/arch/x86/tests/perf-time-to-tsc.c       |  2 +-
 tools/perf/builtin-record.c                        |  2 +-
 tools/perf/builtin-sched.c                         |  4 +-
 tools/perf/builtin-script.c                        |  2 +-
 tools/perf/builtin-stat.c                          |  4 +-
 tools/perf/tests/code-reading.c                    |  2 +-
 tools/perf/tests/event-times.c                     |  4 +-
 tools/perf/tests/keep-tracking.c                   |  2 +-
 tools/perf/tests/mmap-basic.c                      |  2 +-
 tools/perf/tests/mmap-thread-lookup.c              |  2 +-
 tools/perf/tests/openat-syscall-all-cpus.c         |  2 +-
 tools/perf/tests/openat-syscall.c                  |  2 +-
 tools/perf/tests/sw-clock.c                        |  2 +-
 tools/perf/tests/switch-tracking.c                 |  2 +-
 tools/perf/tests/task-exit.c                       |  2 +-
 tools/perf/tests/thread-map.c                      |  8 +--
 tools/perf/util/event.c                            |  6 +--
 tools/perf/util/event.h                            |  6 +--
 tools/perf/util/evlist.c                           | 10 ++--
 tools/perf/util/evlist.h                           |  6 +--
 tools/perf/util/evsel.c                            | 10 ++--
 tools/perf/util/evsel.h                            |  6 +--
 tools/perf/util/machine.c                          |  2 +-
 tools/perf/util/machine.h                          |  4 +-
 tools/perf/util/parse-events.c                     |  2 +-
 tools/perf/util/python.c                           |  6 +--
 .../util/scripting-engines/trace-event-python.c    |  2 +-
 tools/perf/util/thread_map.c                       | 60 +++++++++++-----------
 tools/perf/util/thread_map.h                       | 40 +++++++--------
 29 files changed, 102 insertions(+), 102 deletions(-)
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index 4676fd967dc6..f542b878bdb5 100644
@@ -49,7 +49,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 		},
 		.sample_time	     = true,
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
tools/perf/builtin-record.c +1 -1
index 8779cee58185..bcfc16450608 100644
@@ -1047,7 +1047,7 @@ record__finish_output(struct record *rec)
 static int record__synthesize_workload(struct record *rec, bool tail)
 {
 	int err;
-	struct thread_map *thread_map;
+	struct perf_thread_map *thread_map;
 
 	if (rec->opts.tail_synthesize != tail)
 		return 0;
tools/perf/builtin-sched.c +2 -2
index 51dd48f20972..ac6a0c5d6d6b 100644
@@ -159,7 +159,7 @@ struct perf_sched_map {
 	DECLARE_BITMAP(comp_cpus_mask, MAX_CPUS);
 	int			*comp_cpus;
 	bool			 comp;
-	struct thread_map	*color_pids;
+	struct perf_thread_map *color_pids;
 	const char		*color_pids_str;
 	struct perf_cpu_map	*color_cpus;
 	const char		*color_cpus_str;
@@ -3195,7 +3195,7 @@ static int setup_map_cpus(struct perf_sched *sched)
 
 static int setup_color_pids(struct perf_sched *sched)
 {
-	struct thread_map *map;
+	struct perf_thread_map *map;
 
 	if (!sched->map.color_pids_str)
 		return 0;
tools/perf/builtin-script.c +1 -1
index 0109c8710b93..fccc960df92b 100644
@@ -1628,7 +1628,7 @@ struct perf_script {
 	bool			allocated;
 	bool			per_event_dump;
 	struct perf_cpu_map	*cpus;
-	struct thread_map	*threads;
+	struct perf_thread_map *threads;
 	int			name_width;
 	const char              *time_str;
 	struct perf_time_interval *ptime_range;
tools/perf/builtin-stat.c +2 -2
index d68738b5bd0c..2b9518a38baf 100644
@@ -165,7 +165,7 @@ struct perf_stat {
 	struct perf_tool	 tool;
 	bool			 maps_allocated;
 	struct perf_cpu_map	*cpus;
-	struct thread_map	*threads;
+	struct perf_thread_map *threads;
 	enum aggr_mode		 aggr_mode;
 };
 
@@ -395,7 +395,7 @@ static bool perf_evsel__should_store_id(struct perf_evsel *counter)
 }
 
 static bool is_target_alive(struct target *_target,
-			    struct thread_map *threads)
+			    struct perf_thread_map *threads)
 {
 	struct stat st;
 	int i;
tools/perf/tests/code-reading.c +1 -1
index 948ec278ad06..88c218eacc43 100644
@@ -552,7 +552,7 @@ static int do_test_code_reading(bool try_kcore)
 	struct state state = {
 		.done_cnt = 0,
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
tools/perf/tests/event-times.c +2 -2
index ed90b62bf048..684ad56f7b0f 100644
@@ -57,7 +57,7 @@ static int detach__enable_on_exec(struct perf_evlist *evlist)
 static int attach__current_disabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	int err;
 
 	pr_debug("attaching to current thread as disabled\n");
@@ -83,7 +83,7 @@ static int attach__current_disabled(struct perf_evlist *evlist)
 static int attach__current_enabled(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = perf_evlist__last(evlist);
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	int err;
 
 	pr_debug("attaching to current thread as enabled\n");
tools/perf/tests/keep-tracking.c +1 -1
index 68331a81bcdd..e1e5e32cbb53 100644
@@ -65,7 +65,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 			.uses_mmap   = true,
 		},
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel = NULL;
tools/perf/tests/mmap-basic.c +1 -1
index 1bc8fd3ea510..c1e2fe087b67 100644
@@ -27,7 +27,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 {
 	int err = -1;
 	union perf_event *event;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_cpu_map *cpus;
 	struct perf_evlist *evlist;
 	cpu_set_t cpu_set;
tools/perf/tests/mmap-thread-lookup.c +1 -1
index 0a4301a5155c..ad6ca943e568 100644
@@ -138,7 +138,7 @@ static int synth_all(struct machine *machine)
 
 static int synth_process(struct machine *machine)
 {
-	struct thread_map *map;
+	struct perf_thread_map *map;
 	int err;
 
 	map = thread_map__new_by_pid(getpid());
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
index f393aa836dfb..9cd5bf63bec1 100644
@@ -24,7 +24,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
 	struct perf_evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
-	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
+	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
 	char errbuf[BUFSIZ];
 
tools/perf/tests/openat-syscall.c +1 -1
index 00cd63f90b92..652b8328ca93 100644
@@ -16,7 +16,7 @@ int test__openat_syscall_event(struct test *test __maybe_unused, int subtest __m
 	int err = -1, fd;
 	struct perf_evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
-	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
+	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
 	char errbuf[BUFSIZ];
 
tools/perf/tests/sw-clock.c +1 -1
index d9121b5033b7..d57b8d9c1575 100644
@@ -38,7 +38,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		.freq = 1,
 	};
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_mmap *md;
 
 	attr.sample_freq = 500;
tools/perf/tests/switch-tracking.c +1 -1
index 826f20a4cb51..3652c548cc22 100644
@@ -327,7 +327,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 			.uses_mmap   = true,
 		},
 	};
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
 	struct perf_evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
tools/perf/tests/task-exit.c +1 -1
index d66767be4c45..9602ff91a3c7 100644
@@ -46,7 +46,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
 	const char *argv[] = { "true", NULL };
 	char sbuf[STRERR_BUFSIZE];
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_mmap *md;
 
 	signal(SIGCHLD, sig_handler);
tools/perf/tests/thread-map.c +4 -4
index ccc17aced49e..367dfe708e4c 100644
@@ -13,7 +13,7 @@
 
 int test__thread_map(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct thread_map *map;
+	struct perf_thread_map *map;
 
 	TEST_ASSERT_VAL("failed to set process name",
 			!prctl(PR_SET_NAME, NAMEUL, 0, 0, 0));
@@ -57,7 +57,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,
 			 struct machine *machine __maybe_unused)
 {
 	struct thread_map_event *map = &event->thread_map;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	TEST_ASSERT_VAL("wrong nr",   map->nr == 1);
 	TEST_ASSERT_VAL("wrong pid",  map->entries[0].pid == (u64) getpid());
@@ -80,7 +80,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,
 
 int test__thread_map_synthesize(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	TEST_ASSERT_VAL("failed to set process name",
 			!prctl(PR_SET_NAME, NAMEUL, 0, 0, 0));
@@ -99,7 +99,7 @@ int test__thread_map_synthesize(struct test *test __maybe_unused, int subtest __
 
 int test__thread_map_remove(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	char *str;
 	int i;
 
tools/perf/util/event.c +3 -3
index 406ad8772907..f78837788b14 100644
@@ -616,7 +616,7 @@ static int __event__synthesize_thread(union perf_event *comm_event,
 }
 
 int perf_event__synthesize_thread_map(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine,
 				      bool mmap_data)
@@ -972,7 +972,7 @@ int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
 }
 
 int perf_event__synthesize_thread_map2(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine)
 {
@@ -1377,7 +1377,7 @@ size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp)
 
 size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp)
 {
-	struct thread_map *threads = thread_map__new_event(&event->thread_map);
+	struct perf_thread_map *threads = thread_map__new_event(&event->thread_map);
 	size_t ret;
 
 	ret = fprintf(fp, " nr: ");
tools/perf/util/event.h +3 -3
index cafaac5128ab..70841d115349 100644
@@ -674,7 +674,7 @@ union perf_event {
 void perf_event__print_totals(void);
 
 struct perf_tool;
-struct thread_map;
+struct perf_thread_map;
 struct perf_cpu_map;
 struct perf_stat_config;
 struct perf_counts_values;
@@ -685,11 +685,11 @@ typedef int (*perf_event__handler_t)(struct perf_tool *tool,
 				     struct machine *machine);
 
 int perf_event__synthesize_thread_map(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine, bool mmap_data);
 int perf_event__synthesize_thread_map2(struct perf_tool *tool,
-				      struct thread_map *threads,
+				      struct perf_thread_map *threads,
 				      perf_event__handler_t process,
 				      struct machine *machine);
 int perf_event__synthesize_cpu_map(struct perf_tool *tool,
tools/perf/util/evlist.c +5 -5
index bce883eaf0dc..a95d0461f718 100644
@@ -42,7 +42,7 @@ int sigqueue(pid_t pid, int sig, const union sigval value);
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
 void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-		       struct thread_map *threads)
+		       struct perf_thread_map *threads)
 {
 	int i;
 
@@ -1013,7 +1013,7 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
 {
 	struct perf_evsel *evsel;
 	const struct perf_cpu_map *cpus = evlist->cpus;
-	const struct thread_map *threads = evlist->threads;
+	const struct perf_thread_map *threads = evlist->threads;
 	/*
 	 * Delay setting mp.prot: set it before calling perf_mmap__mmap.
 	 * Its value is decided by evsel's write_backward.
@@ -1059,7 +1059,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 {
 	bool all_threads = (target->per_thread && target->system_wide);
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	/*
 	 * If specify '-a' and '--per-thread' to perf record, perf record
@@ -1105,7 +1105,7 @@ out_delete_threads:
 }
 
 void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-			   struct thread_map *threads)
+			   struct perf_thread_map *threads)
 {
 	/*
 	 * Allow for the possibility that one or another of the maps isn't being
@@ -1359,7 +1359,7 @@ void perf_evlist__close(struct perf_evlist *evlist)
 static int perf_evlist__create_syswide_maps(struct perf_evlist *evlist)
 {
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	int err = -ENOMEM;
 
 	/*
tools/perf/util/evlist.h +3 -3
index c8cda300b584..ab2f0b6c7640 100644
@@ -44,7 +44,7 @@ struct perf_evlist {
 	struct fdarray	 pollfd;
 	struct perf_mmap *mmap;
 	struct perf_mmap *overwrite_mmap;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 	struct perf_cpu_map *cpus;
 	struct perf_evsel *selected;
 	struct events_stats stats;
@@ -69,7 +69,7 @@ struct perf_evlist *perf_evlist__new(void);
 struct perf_evlist *perf_evlist__new_default(void);
 struct perf_evlist *perf_evlist__new_dummy(void);
 void perf_evlist__init(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-		       struct thread_map *threads);
+		       struct perf_thread_map *threads);
 void perf_evlist__exit(struct perf_evlist *evlist);
 void perf_evlist__delete(struct perf_evlist *evlist);
 
@@ -195,7 +195,7 @@ void perf_evlist__set_selected(struct perf_evlist *evlist,
 			       struct perf_evsel *evsel);
 
 void perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus,
-			   struct thread_map *threads);
+			   struct perf_thread_map *threads);
 int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target);
 int perf_evlist__apply_filters(struct perf_evlist *evlist, struct perf_evsel **err_evsel);
 
tools/perf/util/evsel.c +5 -5
index 958206c538c3..ab66d65b7968 100644
@@ -1743,7 +1743,7 @@ static int update_fds(struct perf_evsel *evsel,
 
 static bool ignore_missing_thread(struct perf_evsel *evsel,
 				  int nr_cpus, int cpu,
-				  struct thread_map *threads,
+				  struct perf_thread_map *threads,
 				  int thread, int err)
 {
 	pid_t ignore_pid = thread_map__pid(threads, thread);
@@ -1826,7 +1826,7 @@ static int perf_event_open(struct perf_evsel *evsel,
 }
 
 int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
-		     struct thread_map *threads)
+		     struct perf_thread_map *threads)
 {
 	int cpu, thread, nthreads;
 	unsigned long flags = PERF_FLAG_FD_CLOEXEC;
@@ -1849,7 +1849,7 @@ int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
 	}
 
 	if (threads == NULL) {
-		static struct thread_map *empty_thread_map;
+		static struct perf_thread_map *empty_thread_map;
 
 		if (empty_thread_map == NULL) {
 			empty_thread_map = thread_map__new_by_tid(-1);
@@ -2090,7 +2090,7 @@ int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
 }
 
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
-				struct thread_map *threads)
+				struct perf_thread_map *threads)
 {
 	return perf_evsel__open(evsel, NULL, threads);
 }
@@ -3065,7 +3065,7 @@ static int store_evsel_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 int perf_evsel__store_ids(struct perf_evsel *evsel, struct perf_evlist *evlist)
 {
 	struct perf_cpu_map *cpus = evsel->cpus;
-	struct thread_map *threads = evsel->threads;
+	struct perf_thread_map *threads = evsel->threads;
 
 	if (perf_evsel__alloc_id(evsel, cpus->nr, threads->nr))
 		return -ENOMEM;
tools/perf/util/evsel.h +3 -3
index 76b14037f260..ba2385f22e28 100644
@@ -126,7 +126,7 @@ struct perf_evsel {
 	void			*handler;
 	struct perf_cpu_map	*cpus;
 	struct perf_cpu_map	*own_cpus;
-	struct thread_map	*threads;
+	struct perf_thread_map *threads;
 	unsigned int		sample_size;
 	int			id_pos;
 	int			is_pos;
@@ -302,9 +302,9 @@ int perf_evsel__disable(struct perf_evsel *evsel);
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
 			     struct perf_cpu_map *cpus);
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
-				struct thread_map *threads);
+				struct perf_thread_map *threads);
 int perf_evsel__open(struct perf_evsel *evsel, struct perf_cpu_map *cpus,
-		     struct thread_map *threads);
+		     struct perf_thread_map *threads);
 void perf_evsel__close(struct perf_evsel *evsel);
 
 struct perf_sample;
tools/perf/util/machine.c +1 -1
index cf826eca3aaf..a2359a33c748 100644
@@ -2599,7 +2599,7 @@ int machines__for_each_thread(struct machines *machines,
 }
 
 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				  struct target *target, struct thread_map *threads,
+				  struct target *target, struct perf_thread_map *threads,
 				  perf_event__handler_t process, bool data_mmap,
 				  unsigned int nr_threads_synthesize)
 {
tools/perf/util/machine.h +2 -2
index f70ab98a7bde..7f64016758e0 100644
@@ -251,12 +251,12 @@ int machines__for_each_thread(struct machines *machines,
 			      void *priv);
 
 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				  struct target *target, struct thread_map *threads,
+				  struct target *target, struct perf_thread_map *threads,
 				  perf_event__handler_t process, bool data_mmap,
 				  unsigned int nr_threads_synthesize);
 static inline
 int machine__synthesize_threads(struct machine *machine, struct target *target,
-				struct thread_map *threads, bool data_mmap,
+				struct perf_thread_map *threads, bool data_mmap,
 				unsigned int nr_threads_synthesize)
 {
 	return __machine__synthesize_threads(machine, NULL, target, threads,
tools/perf/util/parse-events.c +1 -1
index 077509609d03..352c5198b453 100644
@@ -2313,7 +2313,7 @@ static bool is_event_supported(u8 type, unsigned config)
 		.config = config,
 		.disabled = 1,
 	};
-	struct thread_map *tmap = thread_map__new_by_tid(0);
+	struct perf_thread_map *tmap = thread_map__new_by_tid(0);
 
 	if (tmap == NULL)
 		return false;
tools/perf/util/python.c +3 -3
index be27956ae080..62dda70227e5 100644
@@ -605,7 +605,7 @@ static int pyrf_cpu_map__setup_types(void)
 struct pyrf_thread_map {
 	PyObject_HEAD
 
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 };
 
 static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads,
@@ -797,7 +797,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
 {
 	struct perf_evsel *evsel = &pevsel->evsel;
 	struct perf_cpu_map *cpus = NULL;
-	struct thread_map *threads = NULL;
+	struct perf_thread_map *threads = NULL;
 	PyObject *pcpus = NULL, *pthreads = NULL;
 	int group = 0, inherit = 0;
 	static char *kwlist[] = { "cpus", "threads", "group", "inherit", NULL };
@@ -866,7 +866,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist,
 {
 	PyObject *pcpus = NULL, *pthreads = NULL;
 	struct perf_cpu_map *cpus;
-	struct thread_map *threads;
+	struct perf_thread_map *threads;
 
 	if (!PyArg_ParseTuple(args, "OO", &pcpus, &pthreads))
 		return -1;
tools/perf/util/scripting-engines/trace-event-python.c +1 -1
index a53b30b8819b..0a7e662036b4 100644
@@ -1392,7 +1392,7 @@ process_stat(struct perf_evsel *counter, int cpu, int thread, u64 tstamp,
 static void python_process_stat(struct perf_stat_config *config,
 				struct perf_evsel *counter, u64 tstamp)
 {
-	struct thread_map *threads = counter->threads;
+	struct perf_thread_map *threads = counter->threads;
 	struct perf_cpu_map *cpus = counter->cpus;
 	int cpu, thread;
 
tools/perf/util/thread_map.c +30 -30

204 lines not on this page · raw message

tools/perf/util/thread_map.h +20 -20
index 2f689c90a8c6..9358b1b6e657 100644
@@ -11,7 +11,7 @@ struct thread_map_data {
 	char	*comm;
 };
 
-struct thread_map {
+struct perf_thread_map {
 	refcount_t refcnt;
 	int nr;
 	int err_thread;
@@ -20,46 +20,46 @@ struct thread_map {
 
 struct thread_map_event;
 
-struct thread_map *thread_map__new_dummy(void);
-struct thread_map *thread_map__new_by_pid(pid_t pid);
-struct thread_map *thread_map__new_by_tid(pid_t tid);
-struct thread_map *thread_map__new_by_uid(uid_t uid);
-struct thread_map *thread_map__new_all_cpus(void);
-struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid);
-struct thread_map *thread_map__new_event(struct thread_map_event *event);
+struct perf_thread_map *thread_map__new_dummy(void);
+struct perf_thread_map *thread_map__new_by_pid(pid_t pid);
+struct perf_thread_map *thread_map__new_by_tid(pid_t tid);
+struct perf_thread_map *thread_map__new_by_uid(uid_t uid);
+struct perf_thread_map *thread_map__new_all_cpus(void);
+struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid);
+struct perf_thread_map *thread_map__new_event(struct thread_map_event *event);
 
-struct thread_map *thread_map__get(struct thread_map *map);
-void thread_map__put(struct thread_map *map);
+struct perf_thread_map *thread_map__get(struct perf_thread_map *map);
+void thread_map__put(struct perf_thread_map *map);
 
-struct thread_map *thread_map__new_str(const char *pid,
+struct perf_thread_map *thread_map__new_str(const char *pid,
 		const char *tid, uid_t uid, bool all_threads);
 
-struct thread_map *thread_map__new_by_tid_str(const char *tid_str);
+struct perf_thread_map *thread_map__new_by_tid_str(const char *tid_str);
 
-size_t thread_map__fprintf(struct thread_map *threads, FILE *fp);
+size_t thread_map__fprintf(struct perf_thread_map *threads, FILE *fp);
 
-static inline int thread_map__nr(struct thread_map *threads)
+static inline int thread_map__nr(struct perf_thread_map *threads)
 {
 	return threads ? threads->nr : 1;
 }
 
-static inline pid_t thread_map__pid(struct thread_map *map, int thread)
+static inline pid_t thread_map__pid(struct perf_thread_map *map, int thread)
 {
 	return map->map[thread].pid;
 }
 
 static inline void
-thread_map__set_pid(struct thread_map *map, int thread, pid_t pid)
+thread_map__set_pid(struct perf_thread_map *map, int thread, pid_t pid)
 {
 	map->map[thread].pid = pid;
 }
 
-static inline char *thread_map__comm(struct thread_map *map, int thread)
+static inline char *thread_map__comm(struct perf_thread_map *map, int thread)
 {
 	return map->map[thread].comm;
 }
 
-void thread_map__read_comms(struct thread_map *threads);
-bool thread_map__has(struct thread_map *threads, pid_t pid);
-int thread_map__remove(struct thread_map *threads, int idx);
+void thread_map__read_comms(struct perf_thread_map *threads);
+bool thread_map__has(struct perf_thread_map *threads, pid_t pid);
+int thread_map__remove(struct perf_thread_map *threads, int idx);
 #endif	/* __PERF_THREAD_MAP_H */
author reviewer
#7 lore raw

PATCH 4/79 perf tools: Rename struct perf_evsel to struct evsel

In reply to Jiri Olsa

Renaming struct perf_evsel to struct evsel, so we don't have a name clash when we add struct perf_evsel in libperf.

---
 tools/perf/arch/arm/util/auxtrace.c           |   2 +-
 tools/perf/arch/arm/util/cs-etm.c             |  14 +-
 tools/perf/arch/powerpc/util/kvm-stat.c       |   6 +-
 tools/perf/arch/s390/util/auxtrace.c          |   2 +-
 tools/perf/arch/s390/util/kvm-stat.c          |   8 +-
 tools/perf/arch/x86/tests/intel-cqm.c         |   2 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c  |   2 +-
 tools/perf/arch/x86/util/auxtrace.c           |   2 +-
 tools/perf/arch/x86/util/intel-bts.c          |  10 +-
 tools/perf/arch/x86/util/intel-pt.c           |  20 +--
 tools/perf/arch/x86/util/kvm-stat.c           |  12 +-
 tools/perf/builtin-annotate.c                 |  16 +-
 tools/perf/builtin-c2c.c                      |   4 +-
 tools/perf/builtin-diff.c                     |  12 +-
 tools/perf/builtin-evlist.c                   |   2 +-
 tools/perf/builtin-inject.c                   |  30 ++--
 tools/perf/builtin-kmem.c                     |  24 +--
 tools/perf/builtin-kvm.c                      |  20 +--
 tools/perf/builtin-lock.c                     |  30 ++--
 tools/perf/builtin-mem.c                      |   2 +-
 tools/perf/builtin-record.c                   |   4 +-
 tools/perf/builtin-report.c                   |  22 +--
 tools/perf/builtin-sched.c                    |  74 ++++----
 tools/perf/builtin-script.c                   |  90 +++++-----
 tools/perf/builtin-stat.c                     |  18 +-
 tools/perf/builtin-timechart.c                |  44 ++---
 tools/perf/builtin-top.c                      |  30 ++--
 tools/perf/builtin-trace.c                    |  76 ++++----
 tools/perf/tests/backward-ring-buffer.c       |   2 +-
 tools/perf/tests/code-reading.c               |   2 +-
 tools/perf/tests/event-times.c                |  14 +-
 tools/perf/tests/event_update.c               |   2 +-
 tools/perf/tests/evsel-roundtrip-name.c       |   4 +-
 tools/perf/tests/evsel-tp-sched.c             |   4 +-
 tools/perf/tests/hists_cumulate.c             |  14 +-
 tools/perf/tests/hists_filter.c               |   4 +-
 tools/perf/tests/hists_link.c                 |   4 +-
 tools/perf/tests/hists_output.c               |  16 +-
 tools/perf/tests/keep-tracking.c              |   2 +-
 tools/perf/tests/mmap-basic.c                 |   2 +-
 tools/perf/tests/openat-syscall-all-cpus.c    |   2 +-
 tools/perf/tests/openat-syscall-tp-fields.c   |   2 +-
 tools/perf/tests/openat-syscall.c             |   2 +-
 tools/perf/tests/parse-events.c               | 120 ++++++-------
 tools/perf/tests/perf-record.c                |   2 +-
 tools/perf/tests/sample-parsing.c             |   2 +-
 tools/perf/tests/sw-clock.c                   |   2 +-
 tools/perf/tests/switch-tracking.c            |  10 +-
 tools/perf/tests/task-exit.c                  |   2 +-
 tools/perf/ui/browsers/annotate.c             |  14 +-
 tools/perf/ui/browsers/hists.c                |  40 ++---
 tools/perf/ui/browsers/res_sample.c           |   2 +-
 tools/perf/ui/browsers/scripts.c              |   4 +-
 tools/perf/ui/gtk/annotate.c                  |   6 +-
 tools/perf/ui/gtk/gtk.h                       |   4 +-
 tools/perf/ui/gtk/hists.c                     |   2 +-
 tools/perf/ui/hist.c                          |   8 +-
 tools/perf/util/annotate.c                    |  32 ++--
 tools/perf/util/annotate.h                    |  26 +--
 tools/perf/util/auxtrace.c                    |   8 +-
 tools/perf/util/bpf-loader.c                  |  12 +-
 tools/perf/util/bpf-loader.h                  |   6 +-
 tools/perf/util/build-id.c                    |   2 +-
 tools/perf/util/build-id.h                    |   2 +-
 tools/perf/util/callchain.c                   |   2 +-
 tools/perf/util/callchain.h                   |   2 +-
 tools/perf/util/cgroup.c                      |  10 +-
 tools/perf/util/counts.c                      |   6 +-
 tools/perf/util/counts.h                      |   6 +-
 tools/perf/util/cs-etm.c                      |   4 +-
 tools/perf/util/data-convert-bt.c             |  18 +-
 tools/perf/util/db-export.c                   |   6 +-
 tools/perf/util/db-export.h                   |  10 +-
 tools/perf/util/evlist.c                      | 142 +++++++--------
 tools/perf/util/evlist.h                      |  46 ++---
 tools/perf/util/evsel.c                       | 168 +++++++++---------
 tools/perf/util/evsel.h                       | 146 +++++++--------
 tools/perf/util/evsel_fprintf.c               |   4 +-
 tools/perf/util/header.c                      |  58 +++---
 tools/perf/util/header.h                      |   8 +-
 tools/perf/util/hist.c                        |  26 +--
 tools/perf/util/hist.h                        |  28 +--
 tools/perf/util/intel-bts.c                   |   2 +-
 tools/perf/util/intel-pt.c                    |  36 ++--
 tools/perf/util/jitdump.c                     |   4 +-
 tools/perf/util/kvm-stat.h                    |  18 +-
 tools/perf/util/machine.c                     |   6 +-
 tools/perf/util/machine.h                     |   4 +-
 tools/perf/util/map.h                         |   2 +-
 tools/perf/util/metricgroup.c                 |  22 +--
 tools/perf/util/metricgroup.h                 |   6 +-
 tools/perf/util/parse-events.c                |  48 ++---
 tools/perf/util/parse-events.h                |   2 +-
 tools/perf/util/python.c                      |  14 +-
 tools/perf/util/record.c                      |  16 +-
 tools/perf/util/s390-cpumsf.c                 |   2 +-
 tools/perf/util/s390-sample-raw.c             |   2 +-
 .../util/scripting-engines/trace-event-perl.c |   8 +-
 .../scripting-engines/trace-event-python.c    |  22 +--
 tools/perf/util/session.c                     |  30 ++--
 tools/perf/util/session.h                     |   8 +-
 tools/perf/util/sort.c                        |  28 +--
 tools/perf/util/stat-display.c                |  60 +++----
 tools/perf/util/stat-shadow.c                 |  38 ++--
 tools/perf/util/stat.c                        |  38 ++--
 tools/perf/util/stat.h                        |  14 +-
 tools/perf/util/tool.h                        |   4 +-
 tools/perf/util/top.c                         |   2 +-
 tools/perf/util/top.h                         |   4 +-
 tools/perf/util/trace-event-info.c            |   4 +-
 tools/perf/util/trace-event-scripting.c       |   2 +-
 tools/perf/util/trace-event.h                 |   4 +-
 112 files changed, 1050 insertions(+), 1050 deletions(-)
tools/perf/arch/arm/util/auxtrace.c +1 -1
index 02014740a1aa..fd17dccfcb0b 100644
@@ -53,7 +53,7 @@ struct auxtrace_record
 *auxtrace_record__init(struct perf_evlist *evlist, int *err)
 {
 	struct perf_pmu	*cs_etm_pmu;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	bool found_etm = false;
 	bool found_spe = false;
 	static struct perf_pmu **arm_spe_pmus = NULL;
tools/perf/arch/arm/util/cs-etm.c +7 -7
index 4208974c24f8..49dda28023e4 100644
@@ -208,7 +208,7 @@ static int cs_etm_parse_snapshot_options(struct auxtrace_record *itr,
 }
 
 static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
-				struct perf_evsel *evsel)
+				struct evsel *evsel)
 {
 	char msg[BUFSIZ], path[PATH_MAX], *sink;
 	struct perf_evsel_config_term *term;
@@ -252,7 +252,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
 	struct cs_etm_recording *ptr =
 				container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
-	struct perf_evsel *evsel, *cs_etm_evsel = NULL;
+	struct evsel *evsel, *cs_etm_evsel = NULL;
 	struct cpu_map *cpus = evlist->cpus;
 	bool privileged = (geteuid() == 0 || perf_event_paranoid() < 0);
 	int err = 0;
@@ -407,7 +407,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
 
 	/* Add dummy event to keep tracking */
 	if (opts->full_auxtrace) {
-		struct perf_evsel *tracking_evsel;
+		struct evsel *tracking_evsel;
 
 		err = parse_events(evlist, "dummy:u", NULL);
 		if (err)
@@ -435,7 +435,7 @@ static u64 cs_etm_get_config(struct auxtrace_record *itr)
 			container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
 	struct perf_evlist *evlist = ptr->evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
 		if (evsel->attr.type == cs_etm_pmu->type) {
@@ -817,7 +817,7 @@ static int cs_etm_snapshot_start(struct auxtrace_record *itr)
 {
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->cs_etm_pmu->type)
@@ -830,7 +830,7 @@ static int cs_etm_snapshot_finish(struct auxtrace_record *itr)
 {
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->cs_etm_pmu->type)
@@ -858,7 +858,7 @@ static int cs_etm_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->cs_etm_pmu->type)
tools/perf/arch/powerpc/util/kvm-stat.c +3 -3
index f9db341c47b6..557c474f0a4b 100644
@@ -32,7 +32,7 @@ const char *ppc_book3s_hv_kvm_tp[] = {
 const char *kvm_events_tp[NR_TPS + 1];
 const char *kvm_exit_reason;
 
-static void hcall_event_get_key(struct perf_evsel *evsel,
+static void hcall_event_get_key(struct evsel *evsel,
 				struct perf_sample *sample,
 				struct event_key *key)
 {
@@ -55,14 +55,14 @@ static const char *get_hcall_exit_reason(u64 exit_code)
 	return "UNKNOWN";
 }
 
-static bool hcall_event_end(struct perf_evsel *evsel,
+static bool hcall_event_end(struct evsel *evsel,
 			    struct perf_sample *sample __maybe_unused,
 			    struct event_key *key __maybe_unused)
 {
 	return (!strcmp(evsel->name, kvm_events_tp[3]));
 }
 
-static bool hcall_event_begin(struct perf_evsel *evsel,
+static bool hcall_event_begin(struct evsel *evsel,
 			      struct perf_sample *sample, struct event_key *key)
 {
 	if (!strcmp(evsel->name, kvm_events_tp[2])) {
tools/perf/arch/s390/util/auxtrace.c +1 -1
index 0fe1be93f375..aec819b945c5 100644
@@ -86,7 +86,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
 					      int *err)
 {
 	struct auxtrace_record *aux;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	int diagnose = 0;
 
 	*err = 0;
tools/perf/arch/s390/util/kvm-stat.c +4 -4
index f852f2a77e0a..dac78441338c 100644
@@ -23,7 +23,7 @@ const char *kvm_exit_reason = "icptcode";
 const char *kvm_entry_trace = "kvm:kvm_s390_sie_enter";
 const char *kvm_exit_trace = "kvm:kvm_s390_sie_exit";
 
-static void event_icpt_insn_get_key(struct perf_evsel *evsel,
+static void event_icpt_insn_get_key(struct evsel *evsel,
 				    struct perf_sample *sample,
 				    struct event_key *key)
 {
@@ -34,7 +34,7 @@ static void event_icpt_insn_get_key(struct perf_evsel *evsel,
 	key->exit_reasons = sie_icpt_insn_codes;
 }
 
-static void event_sigp_get_key(struct perf_evsel *evsel,
+static void event_sigp_get_key(struct evsel *evsel,
 			       struct perf_sample *sample,
 			       struct event_key *key)
 {
@@ -42,7 +42,7 @@ static void event_sigp_get_key(struct perf_evsel *evsel,
 	key->exit_reasons = sie_sigp_order_codes;
 }
 
-static void event_diag_get_key(struct perf_evsel *evsel,
+static void event_diag_get_key(struct evsel *evsel,
 			       struct perf_sample *sample,
 			       struct event_key *key)
 {
@@ -50,7 +50,7 @@ static void event_diag_get_key(struct perf_evsel *evsel,
 	key->exit_reasons = sie_diagnose_codes;
 }
 
-static void event_icpt_prog_get_key(struct perf_evsel *evsel,
+static void event_icpt_prog_get_key(struct evsel *evsel,
 				    struct perf_sample *sample,
 				    struct event_key *key)
 {
tools/perf/arch/x86/tests/intel-cqm.c +1 -1
index 94aa0b673b7f..b88ed71b2e3f 100644
@@ -41,7 +41,7 @@ static pid_t spawn(void)
 int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	struct perf_event_attr pe;
 	int i, fd[2], flag, ret;
 	size_t mmap_len;
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index f542b878bdb5..43fc7d426d93 100644
@@ -52,7 +52,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	int err = -1, ret, i;
 	const char *comm1, *comm2;
 	struct perf_tsc_conversion tc;
tools/perf/arch/x86/util/auxtrace.c +1 -1
index d711268af330..02f192114448 100644
@@ -21,7 +21,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
 {
 	struct perf_pmu *intel_pt_pmu;
 	struct perf_pmu *intel_bts_pmu;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	bool found_pt = false;
 	bool found_bts = false;
 
tools/perf/arch/x86/util/intel-bts.c +5 -5
index da1583d27efd..59685a19c3b9 100644
@@ -105,7 +105,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
 	struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu;
-	struct perf_evsel *evsel, *intel_bts_evsel = NULL;
+	struct evsel *evsel, *intel_bts_evsel = NULL;
 	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 
@@ -220,7 +220,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
 
 	/* Add dummy event to keep tracking */
 	if (opts->full_auxtrace) {
-		struct perf_evsel *tracking_evsel;
+		struct evsel *tracking_evsel;
 		int err;
 
 		err = parse_events(evlist, "dummy:u", NULL);
@@ -313,7 +313,7 @@ static int intel_bts_snapshot_start(struct auxtrace_record *itr)
 {
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(btsr->evlist, evsel) {
 		if (evsel->attr.type == btsr->intel_bts_pmu->type)
@@ -326,7 +326,7 @@ static int intel_bts_snapshot_finish(struct auxtrace_record *itr)
 {
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(btsr->evlist, evsel) {
 		if (evsel->attr.type == btsr->intel_bts_pmu->type)
@@ -408,7 +408,7 @@ static int intel_bts_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(btsr->evlist, evsel) {
 		if (evsel->attr.type == btsr->intel_bts_pmu->type)
tools/perf/arch/x86/util/intel-pt.c +10 -10
index 69a23e40abc9..b42df73fd7ff 100644
@@ -112,7 +112,7 @@ static u64 intel_pt_masked_bits(u64 mask, u64 bits)
 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
 				struct perf_evlist *evlist, u64 *res)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	u64 mask;
 
 	*res = 0;
@@ -271,7 +271,7 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
 static const char *intel_pt_find_filter(struct perf_evlist *evlist,
 					struct perf_pmu *intel_pt_pmu)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
 		if (evsel->attr.type == intel_pt_pmu->type)
@@ -401,7 +401,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr,
 static int intel_pt_track_switches(struct perf_evlist *evlist)
 {
 	const char *sched_switch = "sched:sched_switch";
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int err;
 
 	if (!perf_evlist__can_select_event(evlist, sched_switch))
@@ -513,7 +513,7 @@ static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu,
 }
 
 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
-				    struct perf_evsel *evsel)
+				    struct evsel *evsel)
 {
 	int err;
 	char c;
@@ -556,7 +556,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 			container_of(itr, struct intel_pt_recording, itr);
 	struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu;
 	bool have_timing_info, need_immediate = false;
-	struct perf_evsel *evsel, *intel_pt_evsel = NULL;
+	struct evsel *evsel, *intel_pt_evsel = NULL;
 	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 	u64 tsc_bit;
@@ -685,7 +685,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 					!target__has_task(&opts->target);
 
 			if (!cpu_wide && perf_can_record_cpu_wide()) {
-				struct perf_evsel *switch_evsel;
+				struct evsel *switch_evsel;
 
 				err = parse_events(evlist, "dummy:u", NULL);
 				if (err)
@@ -743,7 +743,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 
 	/* Add dummy event to keep tracking */
 	if (opts->full_auxtrace) {
-		struct perf_evsel *tracking_evsel;
+		struct evsel *tracking_evsel;
 
 		err = parse_events(evlist, "dummy:u", NULL);
 		if (err)
@@ -784,7 +784,7 @@ static int intel_pt_snapshot_start(struct auxtrace_record *itr)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->intel_pt_pmu->type)
@@ -797,7 +797,7 @@ static int intel_pt_snapshot_finish(struct auxtrace_record *itr)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->intel_pt_pmu->type)
@@ -1070,7 +1070,7 @@ static int intel_pt_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->intel_pt_pmu->type)
tools/perf/arch/x86/util/kvm-stat.c +6 -6
index 865a9762f22e..54a3f2373c35 100644
@@ -27,7 +27,7 @@ const char *kvm_exit_trace = "kvm:kvm_exit";
  * the time of MMIO write: kvm_mmio(KVM_TRACE_MMIO_WRITE...) -> kvm_entry
  * the time of MMIO read: kvm_exit -> kvm_mmio(KVM_TRACE_MMIO_READ...).
  */
-static void mmio_event_get_key(struct perf_evsel *evsel, struct perf_sample *sample,
+static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample,
 			       struct event_key *key)
 {
 	key->key  = perf_evsel__intval(evsel, sample, "gpa");
@@ -38,7 +38,7 @@ static void mmio_event_get_key(struct perf_evsel *evsel, struct perf_sample *sam
 #define KVM_TRACE_MMIO_READ 1
 #define KVM_TRACE_MMIO_WRITE 2
 
-static bool mmio_event_begin(struct perf_evsel *evsel,
+static bool mmio_event_begin(struct evsel *evsel,
 			     struct perf_sample *sample, struct event_key *key)
 {
 	/* MMIO read begin event in kernel. */
@@ -55,7 +55,7 @@ static bool mmio_event_begin(struct perf_evsel *evsel,
 	return false;
 }
 
-static bool mmio_event_end(struct perf_evsel *evsel, struct perf_sample *sample,
+static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample,
 			   struct event_key *key)
 {
 	/* MMIO write end event in kernel. */
@@ -89,7 +89,7 @@ static struct kvm_events_ops mmio_events = {
 };
 
  /* The time of emulation pio access is from kvm_pio to kvm_entry. */
-static void ioport_event_get_key(struct perf_evsel *evsel,
+static void ioport_event_get_key(struct evsel *evsel,
 				 struct perf_sample *sample,
 				 struct event_key *key)
 {
@@ -97,7 +97,7 @@ static void ioport_event_get_key(struct perf_evsel *evsel,
 	key->info = perf_evsel__intval(evsel, sample, "rw");
 }
 
-static bool ioport_event_begin(struct perf_evsel *evsel,
+static bool ioport_event_begin(struct evsel *evsel,
 			       struct perf_sample *sample,
 			       struct event_key *key)
 {
@@ -109,7 +109,7 @@ static bool ioport_event_begin(struct perf_evsel *evsel,
 	return false;
 }
 
-static bool ioport_event_end(struct perf_evsel *evsel,
+static bool ioport_event_end(struct evsel *evsel,
 			     struct perf_sample *sample __maybe_unused,
 			     struct event_key *key __maybe_unused)
 {
tools/perf/builtin-annotate.c +8 -8
index e0aa14faf2b5..9bb637165bf9 100644
@@ -156,7 +156,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
 	struct hist_entry *he = iter->he;
 	struct branch_info *bi;
 	struct perf_sample *sample = iter->sample;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 	int err;
 
 	bi = he->branch_info;
@@ -171,7 +171,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
 	return err;
 }
 
-static int process_branch_callback(struct perf_evsel *evsel,
+static int process_branch_callback(struct evsel *evsel,
 				   struct perf_sample *sample,
 				   struct addr_location *al __maybe_unused,
 				   struct perf_annotate *ann,
@@ -208,7 +208,7 @@ static bool has_annotation(struct perf_annotate *ann)
 	return ui__has_annotation() || ann->use_stdio2;
 }
 
-static int perf_evsel__add_sample(struct perf_evsel *evsel,
+static int perf_evsel__add_sample(struct evsel *evsel,
 				  struct perf_sample *sample,
 				  struct addr_location *al,
 				  struct perf_annotate *ann,
@@ -257,7 +257,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool);
@@ -293,7 +293,7 @@ static int process_feature_event(struct perf_session *session,
 }
 
 static int hist_entry__tty_annotate(struct hist_entry *he,
-				    struct perf_evsel *evsel,
+				    struct evsel *evsel,
 				    struct perf_annotate *ann)
 {
 	if (!ann->use_stdio2)
@@ -303,7 +303,7 @@ static int hist_entry__tty_annotate(struct hist_entry *he,
 }
 
 static void hists__find_annotations(struct hists *hists,
-				    struct perf_evsel *evsel,
+				    struct evsel *evsel,
 				    struct perf_annotate *ann)
 {
 	struct rb_node *nd = rb_first_cached(&hists->entries), *next;
@@ -333,7 +333,7 @@ static void hists__find_annotations(struct hists *hists,
 		if (use_browser == 2) {
 			int ret;
 			int (*annotate)(struct hist_entry *he,
-					struct perf_evsel *evsel,
+					struct evsel *evsel,
 					struct hist_browser_timer *hbt);
 
 			annotate = dlsym(perf_gtk_handle,
@@ -387,7 +387,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 {
 	int ret;
 	struct perf_session *session = ann->session;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	u64 total_nr_samples;
 
 	if (ann->cpu_list) {
tools/perf/builtin-c2c.c +2 -2
index 52035dacf253..d251a486f329 100644
@@ -248,7 +248,7 @@ static void compute_stats(struct c2c_hist_entry *c2c_he,
 static int process_sample_event(struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct c2c_hists *c2c_hists = &c2c.hists;
@@ -2237,7 +2237,7 @@ static void print_pareto(FILE *out)
 static void print_c2c_info(FILE *out, struct perf_session *session)
 {
 	struct perf_evlist *evlist = session->evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	bool first = true;
 
 	fprintf(out, "=================================================\n");
tools/perf/builtin-diff.c +6 -6
index f6f5dd15bea7..c3b4b8196e00 100644
@@ -376,7 +376,7 @@ struct hist_entry_ops block_hist_ops = {
 static int diff__process_sample_event(struct perf_tool *tool,
 				      union perf_event *event,
 				      struct perf_sample *sample,
-				      struct perf_evsel *evsel,
+				      struct evsel *evsel,
 				      struct machine *machine)
 {
 	struct perf_diff *pdiff = container_of(tool, struct perf_diff, tool);
@@ -448,10 +448,10 @@ static struct perf_diff pdiff = {
 	},
 };
 
-static struct perf_evsel *evsel_match(struct perf_evsel *evsel,
+static struct evsel *evsel_match(struct evsel *evsel,
 				      struct perf_evlist *evlist)
 {
-	struct perf_evsel *e;
+	struct evsel *e;
 
 	evlist__for_each_entry(evlist, e) {
 		if (perf_evsel__match2(evsel, e))
@@ -463,7 +463,7 @@ static struct perf_evsel *evsel_match(struct perf_evsel *evsel,
 
 static void perf_evlist__collapse_resort(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
 		struct hists *hists = evsel__hists(evsel);
@@ -1010,7 +1010,7 @@ static void data__fprintf(void)
 static void data_process(void)
 {
 	struct perf_evlist *evlist_base = data__files[0].session->evlist;
-	struct perf_evsel *evsel_base;
+	struct evsel *evsel_base;
 	bool first = true;
 
 	evlist__for_each_entry(evlist_base, evsel_base) {
@@ -1020,7 +1020,7 @@ static void data_process(void)
 
 		data__for_each_file_new(i, d) {
 			struct perf_evlist *evlist = d->session->evlist;
-			struct perf_evsel *evsel;
+			struct evsel *evsel;
 			struct hists *hists;
 
 			evsel = evsel_match(evsel_base, evlist);
tools/perf/builtin-evlist.c +1 -1
index 6e4f63b0da4a..e4cb61dc6315 100644
@@ -21,7 +21,7 @@
 static int __cmd_evlist(const char *file_name, struct perf_attr_details *details)
 {
 	struct perf_session *session;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_data data = {
 		.path      = file_name,
 		.mode      = PERF_DATA_MODE_READ,
tools/perf/builtin-inject.c +15 -15
index f4591a1438b4..646a1bf790fc 100644
@@ -215,13 +215,13 @@ static int perf_event__drop_aux(struct perf_tool *tool,
 typedef int (*inject_handler)(struct perf_tool *tool,
 			      union perf_event *event,
 			      struct perf_sample *sample,
-			      struct perf_evsel *evsel,
+			      struct evsel *evsel,
 			      struct machine *machine);
 
 static int perf_event__repipe_sample(struct perf_tool *tool,
 				     union perf_event *event,
 				     struct perf_sample *sample,
-				     struct perf_evsel *evsel,
+				     struct evsel *evsel,
 				     struct machine *machine)
 {
 	if (evsel && evsel->handler) {
@@ -424,7 +424,7 @@ static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool,
 static int perf_event__inject_buildid(struct perf_tool *tool,
 				      union perf_event *event,
 				      struct perf_sample *sample,
-				      struct perf_evsel *evsel __maybe_unused,
+				      struct evsel *evsel __maybe_unused,
 				      struct machine *machine)
 {
 	struct addr_location al;
@@ -465,7 +465,7 @@ static int perf_event__inject_buildid(struct perf_tool *tool,
 static int perf_inject__sched_process_exit(struct perf_tool *tool,
 					   union perf_event *event __maybe_unused,
 					   struct perf_sample *sample,
-					   struct perf_evsel *evsel __maybe_unused,
+					   struct evsel *evsel __maybe_unused,
 					   struct machine *machine __maybe_unused)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
@@ -485,7 +485,7 @@ static int perf_inject__sched_process_exit(struct perf_tool *tool,
 static int perf_inject__sched_switch(struct perf_tool *tool,
 				     union perf_event *event,
 				     struct perf_sample *sample,
-				     struct perf_evsel *evsel,
+				     struct evsel *evsel,
 				     struct machine *machine)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
@@ -509,7 +509,7 @@ static int perf_inject__sched_switch(struct perf_tool *tool,
 static int perf_inject__sched_stat(struct perf_tool *tool,
 				   union perf_event *event __maybe_unused,
 				   struct perf_sample *sample,
-				   struct perf_evsel *evsel,
+				   struct evsel *evsel,
 				   struct machine *machine)
 {
 	struct event_entry *ent;
@@ -541,7 +541,7 @@ static void sig_handler(int sig __maybe_unused)
 	session_done = 1;
 }
 
-static int perf_evsel__check_stype(struct perf_evsel *evsel,
+static int perf_evsel__check_stype(struct evsel *evsel,
 				   u64 sample_type, const char *sample_msg)
 {
 	struct perf_event_attr *attr = &evsel->attr;
@@ -559,7 +559,7 @@ static int perf_evsel__check_stype(struct perf_evsel *evsel,
 static int drop_sample(struct perf_tool *tool __maybe_unused,
 		       union perf_event *event __maybe_unused,
 		       struct perf_sample *sample __maybe_unused,
-		       struct perf_evsel *evsel __maybe_unused,
+		       struct evsel *evsel __maybe_unused,
 		       struct machine *machine __maybe_unused)
 {
 	return 0;
@@ -568,7 +568,7 @@ static int drop_sample(struct perf_tool *tool __maybe_unused,
 static void strip_init(struct perf_inject *inject)
 {
 	struct perf_evlist *evlist = inject->session->evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	inject->tool.context_switch = perf_event__drop;
 
@@ -576,7 +576,7 @@ static void strip_init(struct perf_inject *inject)
 		evsel->handler = drop_sample;
 }
 
-static bool has_tracking(struct perf_evsel *evsel)
+static bool has_tracking(struct evsel *evsel)
 {
 	return evsel->attr.mmap || evsel->attr.mmap2 || evsel->attr.comm ||
 	       evsel->attr.task;
@@ -591,9 +591,9 @@ static bool has_tracking(struct perf_evsel *evsel)
  * and it has a compatible sample type.
  */
 static bool ok_to_remove(struct perf_evlist *evlist,
-			 struct perf_evsel *evsel_to_remove)
+			 struct evsel *evsel_to_remove)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int cnt = 0;
 	bool ok = false;
 
@@ -615,7 +615,7 @@ static bool ok_to_remove(struct perf_evlist *evlist,
 static void strip_fini(struct perf_inject *inject)
 {
 	struct perf_evlist *evlist = inject->session->evlist;
-	struct perf_evsel *evsel, *tmp;
+	struct evsel *evsel, *tmp;
 
 	/* Remove non-synthesized evsels if possible */
 	evlist__for_each_entry_safe(evlist, tmp, evsel) {
@@ -651,7 +651,7 @@ static int __cmd_inject(struct perf_inject *inject)
 	if (inject->build_ids) {
 		inject->tool.sample = perf_event__inject_buildid;
 	} else if (inject->sched_stat) {
-		struct perf_evsel *evsel;
+		struct evsel *evsel;
 
 		evlist__for_each_entry(session->evlist, evsel) {
 			const char *name = perf_evsel__name(evsel);
@@ -712,7 +712,7 @@ static int __cmd_inject(struct perf_inject *inject)
 		 * remove the evsel.
 		 */
 		if (inject->itrace_synth_opts.set) {
-			struct perf_evsel *evsel;
+			struct evsel *evsel;
 
 			perf_header__clear_feat(&session->header,
 						HEADER_AUXTRACE);
tools/perf/builtin-kmem.c +12 -12
index 9e5e60898083..46f828936120 100644
@@ -166,7 +166,7 @@ static int insert_caller_stat(unsigned long call_site,
 	return 0;
 }
 
-static int perf_evsel__process_alloc_event(struct perf_evsel *evsel,
+static int perf_evsel__process_alloc_event(struct evsel *evsel,
 					   struct perf_sample *sample)
 {
 	unsigned long ptr = perf_evsel__intval(evsel, sample, "ptr"),
@@ -185,7 +185,7 @@ static int perf_evsel__process_alloc_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_alloc_node_event(struct perf_evsel *evsel,
+static int perf_evsel__process_alloc_node_event(struct evsel *evsel,
 						struct perf_sample *sample)
 {
 	int ret = perf_evsel__process_alloc_event(evsel, sample);
@@ -229,7 +229,7 @@ static struct alloc_stat *search_alloc_stat(unsigned long ptr,
 	return NULL;
 }
 
-static int perf_evsel__process_free_event(struct perf_evsel *evsel,
+static int perf_evsel__process_free_event(struct evsel *evsel,
 					  struct perf_sample *sample)
 {
 	unsigned long ptr = perf_evsel__intval(evsel, sample, "ptr");
@@ -381,7 +381,7 @@ static int build_alloc_func_list(void)
  * Find first non-memory allocation function from callchain.
  * The allocation functions are in the 'alloc_func_list'.
  */
-static u64 find_callsite(struct perf_evsel *evsel, struct perf_sample *sample)
+static u64 find_callsite(struct evsel *evsel, struct perf_sample *sample)
 {
 	struct addr_location al;
 	struct machine *machine = &kmem_session->machines.host;
@@ -728,7 +728,7 @@ static char *compact_gfp_string(unsigned long gfp_flags)
 	return NULL;
 }
 
-static int parse_gfp_flags(struct perf_evsel *evsel, struct perf_sample *sample,
+static int parse_gfp_flags(struct evsel *evsel, struct perf_sample *sample,
 			   unsigned int gfp_flags)
 {
 	struct tep_record record = {
@@ -779,7 +779,7 @@ static int parse_gfp_flags(struct perf_evsel *evsel, struct perf_sample *sample,
 	return 0;
 }
 
-static int perf_evsel__process_page_alloc_event(struct perf_evsel *evsel,
+static int perf_evsel__process_page_alloc_event(struct evsel *evsel,
 						struct perf_sample *sample)
 {
 	u64 page;
@@ -852,7 +852,7 @@ static int perf_evsel__process_page_alloc_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_page_free_event(struct perf_evsel *evsel,
+static int perf_evsel__process_page_free_event(struct evsel *evsel,
 						struct perf_sample *sample)
 {
 	u64 page;
@@ -930,13 +930,13 @@ static bool perf_kmem__skip_sample(struct perf_sample *sample)
 	return false;
 }
 
-typedef int (*tracepoint_handler)(struct perf_evsel *evsel,
+typedef int (*tracepoint_handler)(struct evsel *evsel,
 				  struct perf_sample *sample);
 
 static int process_sample_event(struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -1363,8 +1363,8 @@ static void sort_result(void)
 static int __cmd_kmem(struct perf_session *session)
 {
 	int err = -EINVAL;
-	struct perf_evsel *evsel;
-	const struct perf_evsel_str_handler kmem_tracepoints[] = {
+	struct evsel *evsel;
+	const struct evsel_str_handler kmem_tracepoints[] = {
 		/* slab allocator */
 		{ "kmem:kmalloc",		perf_evsel__process_alloc_event, },
     		{ "kmem:kmem_cache_alloc",	perf_evsel__process_alloc_event, },
@@ -1967,7 +1967,7 @@ int cmd_kmem(int argc, const char **argv)
 	}
 
 	if (kmem_page) {
-		struct perf_evsel *evsel;
+		struct evsel *evsel;
 
 		evsel = perf_evlist__find_tracepoint_by_name(session->evlist,
 							     "kmem:mm_page_alloc");
tools/perf/builtin-kvm.c +10 -10
index b33c83489120..cf8f27d05296 100644
@@ -57,7 +57,7 @@ static const char *get_filename_for_perf_kvm(void)
 #ifdef HAVE_KVM_STAT_SUPPORT
 #include "util/kvm-stat.h"
 
-void exit_event_get_key(struct perf_evsel *evsel,
+void exit_event_get_key(struct evsel *evsel,
 			struct perf_sample *sample,
 			struct event_key *key)
 {
@@ -65,12 +65,12 @@ void exit_event_get_key(struct perf_evsel *evsel,
 	key->key = perf_evsel__intval(evsel, sample, kvm_exit_reason);
 }
 
-bool kvm_exit_event(struct perf_evsel *evsel)
+bool kvm_exit_event(struct evsel *evsel)
 {
 	return !strcmp(evsel->name, kvm_exit_trace);
 }
 
-bool exit_event_begin(struct perf_evsel *evsel,
+bool exit_event_begin(struct evsel *evsel,
 		      struct perf_sample *sample, struct event_key *key)
 {
 	if (kvm_exit_event(evsel)) {
@@ -81,12 +81,12 @@ bool exit_event_begin(struct perf_evsel *evsel,
 	return false;
 }
 
-bool kvm_entry_event(struct perf_evsel *evsel)
+bool kvm_entry_event(struct evsel *evsel)
 {
 	return !strcmp(evsel->name, kvm_entry_trace);
 }
 
-bool exit_event_end(struct perf_evsel *evsel,
+bool exit_event_end(struct evsel *evsel,
 		    struct perf_sample *sample __maybe_unused,
 		    struct event_key *key __maybe_unused)
 {
@@ -286,7 +286,7 @@ static bool update_kvm_event(struct kvm_event *event, int vcpu_id,
 }
 
 static bool is_child_event(struct perf_kvm_stat *kvm,
-			   struct perf_evsel *evsel,
+			   struct evsel *evsel,
 			   struct perf_sample *sample,
 			   struct event_key *key)
 {
@@ -396,7 +396,7 @@ static bool handle_end_event(struct perf_kvm_stat *kvm,
 
 static
 struct vcpu_event_record *per_vcpu_record(struct thread *thread,
-					  struct perf_evsel *evsel,
+					  struct evsel *evsel,
 					  struct perf_sample *sample)
 {
 	/* Only kvm_entry records vcpu id. */
@@ -419,7 +419,7 @@ struct vcpu_event_record *per_vcpu_record(struct thread *thread,
 
 static bool handle_kvm_event(struct perf_kvm_stat *kvm,
 			     struct thread *thread,
-			     struct perf_evsel *evsel,
+			     struct evsel *evsel,
 			     struct perf_sample *sample)
 {
 	struct vcpu_event_record *vcpu_record;
@@ -672,7 +672,7 @@ static bool skip_sample(struct perf_kvm_stat *kvm,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -1011,7 +1011,7 @@ static int kvm_events_live_report(struct perf_kvm_stat *kvm)
 static int kvm_live_open_events(struct perf_kvm_stat *kvm)
 {
 	int err, rc = -1;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_evlist *evlist = kvm->evlist;
 	char sbuf[STRERR_BUFSIZE];
 
tools/perf/builtin-lock.c +15 -15
index 574e30ec6d7c..38500bff4423 100644
@@ -347,16 +347,16 @@ static struct lock_stat *lock_stat_findnew(void *addr, const char *name)
 }
 
 struct trace_lock_handler {
-	int (*acquire_event)(struct perf_evsel *evsel,
+	int (*acquire_event)(struct evsel *evsel,
 			     struct perf_sample *sample);
 
-	int (*acquired_event)(struct perf_evsel *evsel,
+	int (*acquired_event)(struct evsel *evsel,
 			      struct perf_sample *sample);
 
-	int (*contended_event)(struct perf_evsel *evsel,
+	int (*contended_event)(struct evsel *evsel,
 			       struct perf_sample *sample);
 
-	int (*release_event)(struct perf_evsel *evsel,
+	int (*release_event)(struct evsel *evsel,
 			     struct perf_sample *sample);
 };
 
@@ -396,7 +396,7 @@ enum acquire_flags {
 	READ_LOCK = 2,
 };
 
-static int report_lock_acquire_event(struct perf_evsel *evsel,
+static int report_lock_acquire_event(struct evsel *evsel,
 				     struct perf_sample *sample)
 {
 	void *addr;
@@ -468,7 +468,7 @@ static int report_lock_acquire_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int report_lock_acquired_event(struct perf_evsel *evsel,
+static int report_lock_acquired_event(struct evsel *evsel,
 				      struct perf_sample *sample)
 {
 	void *addr;
@@ -531,7 +531,7 @@ static int report_lock_acquired_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int report_lock_contended_event(struct perf_evsel *evsel,
+static int report_lock_contended_event(struct evsel *evsel,
 				       struct perf_sample *sample)
 {
 	void *addr;
@@ -586,7 +586,7 @@ static int report_lock_contended_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int report_lock_release_event(struct perf_evsel *evsel,
+static int report_lock_release_event(struct evsel *evsel,
 				     struct perf_sample *sample)
 {
 	void *addr;
@@ -656,7 +656,7 @@ static struct trace_lock_handler report_lock_ops  = {
 
 static struct trace_lock_handler *trace_handler;
 
-static int perf_evsel__process_lock_acquire(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_acquire(struct evsel *evsel,
 					     struct perf_sample *sample)
 {
 	if (trace_handler->acquire_event)
@@ -664,7 +664,7 @@ static int perf_evsel__process_lock_acquire(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_lock_acquired(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_acquired(struct evsel *evsel,
 					      struct perf_sample *sample)
 {
 	if (trace_handler->acquired_event)
@@ -672,7 +672,7 @@ static int perf_evsel__process_lock_acquired(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_lock_contended(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_contended(struct evsel *evsel,
 					      struct perf_sample *sample)
 {
 	if (trace_handler->contended_event)
@@ -680,7 +680,7 @@ static int perf_evsel__process_lock_contended(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_lock_release(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_release(struct evsel *evsel,
 					    struct perf_sample *sample)
 {
 	if (trace_handler->release_event)
@@ -806,13 +806,13 @@ static int dump_info(void)
 	return rc;
 }
 
-typedef int (*tracepoint_handler)(struct perf_evsel *evsel,
+typedef int (*tracepoint_handler)(struct evsel *evsel,
 				  struct perf_sample *sample);
 
 static int process_sample_event(struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -847,7 +847,7 @@ static void sort_result(void)
 	}
 }
 
-static const struct perf_evsel_str_handler lock_tracepoints[] = {
+static const struct evsel_str_handler lock_tracepoints[] = {
 	{ "lock:lock_acquire",	 perf_evsel__process_lock_acquire,   }, /* CONFIG_LOCKDEP */
 	{ "lock:lock_acquired",	 perf_evsel__process_lock_acquired,  }, /* CONFIG_LOCKDEP, CONFIG_LOCK_STAT */
 	{ "lock:lock_contended", perf_evsel__process_lock_contended, }, /* CONFIG_LOCKDEP, CONFIG_LOCK_STAT */
tools/perf/builtin-mem.c +1 -1
index f45c8b502f63..9e60eda9297d 100644
@@ -230,7 +230,7 @@ dump_raw_samples(struct perf_tool *tool,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel __maybe_unused,
+				struct evsel *evsel __maybe_unused,
 				struct machine *machine)
 {
 	return dump_raw_samples(tool, event, sample, machine);
tools/perf/builtin-record.c +2 -2
index bcfc16450608..7ba3a2c32e54 100644
@@ -713,7 +713,7 @@ static int record__mmap(struct record *rec)
 static int record__open(struct record *rec)
 {
 	char msg[BUFSIZ];
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_evlist *evlist = rec->evlist;
 	struct perf_session *session = rec->session;
 	struct record_opts *opts = &rec->opts;
@@ -782,7 +782,7 @@ static int record__open(struct record *rec)
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct record *rec = container_of(tool, struct record, tool);
tools/perf/builtin-report.c +11 -11
index abf0b9b8f566..96a506f0d4c1 100644
@@ -128,7 +128,7 @@ static int hist_iter__report_callback(struct hist_entry_iter *iter,
 	int err = 0;
 	struct report *rep = arg;
 	struct hist_entry *he = iter->he;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 	struct perf_sample *sample = iter->sample;
 	struct mem_info *mi;
 	struct branch_info *bi;
@@ -172,7 +172,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
 	struct report *rep = arg;
 	struct branch_info *bi;
 	struct perf_sample *sample = iter->sample;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 	int err;
 
 	if (!ui__has_annotation() && !rep->symbol_ipc)
@@ -225,7 +225,7 @@ static int process_feature_event(struct perf_session *session,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct report *rep = container_of(tool, struct report, tool);
@@ -292,7 +292,7 @@ static int process_sample_event(struct perf_tool *tool,
 static int process_read_event(struct perf_tool *tool,
 			      union perf_event *event,
 			      struct perf_sample *sample __maybe_unused,
-			      struct perf_evsel *evsel,
+			      struct evsel *evsel,
 			      struct machine *machine __maybe_unused)
 {
 	struct report *rep = container_of(tool, struct report, tool);
@@ -400,7 +400,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	char unit;
 	unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
 	u64 nr_events = hists->stats.total_period;
-	struct perf_evsel *evsel = hists_to_evsel(hists);
+	struct evsel *evsel = hists_to_evsel(hists);
 	char buf[512];
 	size_t size = sizeof(buf);
 	int socked_id = hists->socket_filter;
@@ -414,7 +414,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	}
 
 	if (perf_evsel__is_group_event(evsel)) {
-		struct perf_evsel *pos;
+		struct evsel *pos;
 
 		perf_evsel__group_desc(evsel, buf, size);
 		evname = buf;
@@ -463,7 +463,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 					 struct report *rep,
 					 const char *help)
 {
-	struct perf_evsel *pos;
+	struct evsel *pos;
 
 	if (!quiet) {
 		fprintf(stdout, "#\n# Total Lost Samples: %" PRIu64 "\n#\n",
@@ -586,7 +586,7 @@ static int report__browse_hists(struct report *rep)
 static int report__collapse_hists(struct report *rep)
 {
 	struct ui_progress prog;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	int ret = 0;
 
 	ui_progress__init(&prog, rep->nr_entries, "Merging related events...");
@@ -623,7 +623,7 @@ static int hists__resort_cb(struct hist_entry *he, void *arg)
 	struct symbol *sym = he->ms.sym;
 
 	if (rep->symbol_ipc && sym && !sym->annotate2) {
-		struct perf_evsel *evsel = hists_to_evsel(he->hists);
+		struct evsel *evsel = hists_to_evsel(he->hists);
 
 		symbol__annotate2(sym, he->ms.map, evsel,
 				  &annotation__default_options, NULL);
@@ -635,7 +635,7 @@ static int hists__resort_cb(struct hist_entry *he, void *arg)
 static void report__output_resort(struct report *rep)
 {
 	struct ui_progress prog;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 
 	ui_progress__init(&prog, rep->nr_entries, "Sorting events for output...");
 
@@ -818,7 +818,7 @@ static int __cmd_report(struct report *rep)
 {
 	int ret;
 	struct perf_session *session = rep->session;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_data *data = session->data;
 
 	signal(SIGINT, sig_handler);
tools/perf/builtin-sched.c +37 -37

286 lines not on this page · raw message

tools/perf/builtin-script.c +45 -45

332 lines not on this page · raw message

tools/perf/builtin-stat.c +9 -9
index 2b9518a38baf..e0ba97018ad7 100644
@@ -234,7 +234,7 @@ static int write_stat_round_event(u64 tm, u64 type)
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
 static int
-perf_evsel__write_stat_event(struct perf_evsel *counter, u32 cpu, u32 thread,
+perf_evsel__write_stat_event(struct evsel *counter, u32 cpu, u32 thread,
 			     struct perf_counts_values *count)
 {
 	struct perf_sample_id *sid = SID(counter, cpu, thread);
@@ -243,7 +243,7 @@ perf_evsel__write_stat_event(struct perf_evsel *counter, u32 cpu, u32 thread,
 					   process_synthesized_event, NULL);
 }
 
-static int read_single_counter(struct perf_evsel *counter, int cpu,
+static int read_single_counter(struct evsel *counter, int cpu,
 			       int thread, struct timespec *rs)
 {
 	if (counter->tool_event == PERF_TOOL_DURATION_TIME) {
@@ -261,7 +261,7 @@ static int read_single_counter(struct perf_evsel *counter, int cpu,
  * Read out the results of a single counter:
  * do not aggregate counts across CPUs in system-wide mode
  */
-static int read_counter(struct perf_evsel *counter, struct timespec *rs)
+static int read_counter(struct evsel *counter, struct timespec *rs)
 {
 	int nthreads = thread_map__nr(evsel_list->threads);
 	int ncpus, cpu, thread;
@@ -319,7 +319,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
 
 static void read_counters(struct timespec *rs)
 {
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	int ret;
 
 	evlist__for_each_entry(evsel_list, counter) {
@@ -389,7 +389,7 @@ static void workload_exec_failed_signal(int signo __maybe_unused, siginfo_t *inf
 	workload_exec_errno = info->si_value.sival_int;
 }
 
-static bool perf_evsel__should_store_id(struct perf_evsel *counter)
+static bool perf_evsel__should_store_id(struct evsel *counter)
 {
 	return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID;
 }
@@ -423,7 +423,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 	int timeout = stat_config.timeout;
 	char msg[BUFSIZ];
 	unsigned long long t0, t1;
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	struct timespec ts;
 	size_t l;
 	int status = 0;
@@ -868,7 +868,7 @@ static int perf_stat__get_core_cached(struct perf_stat_config *config,
 
 static bool term_percore_set(void)
 {
-	struct perf_evsel *counter;
+	struct evsel *counter;
 
 	evlist__for_each_entry(evsel_list, counter) {
 		if (counter->percore)
@@ -1462,7 +1462,7 @@ static int process_stat_round_event(struct perf_session *session,
 				    union perf_event *event)
 {
 	struct stat_round_event *stat_round = &event->stat_round;
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	struct timespec tsh, *ts = NULL;
 	const char **argv = session->header.env.cmdline_argv;
 	int argc = session->header.env.nr_cmdline;
@@ -1676,7 +1676,7 @@ static void setup_system_wide(int forks)
 	if (!forks)
 		target.system_wide = true;
 	else {
-		struct perf_evsel *counter;
+		struct evsel *counter;
 
 		evlist__for_each_entry(evsel_list, counter) {
 			if (!counter->system_wide)
tools/perf/builtin-timechart.c +22 -22

176 lines not on this page · raw message

tools/perf/builtin-top.c +15 -15
index b46b3c9f57a0..2f22f313985e 100644
@@ -101,7 +101,7 @@ static void perf_top__resize(struct perf_top *top)
 
 static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct symbol *sym;
 	struct annotation *notes;
 	struct map *map;
@@ -186,7 +186,7 @@ static void ui__warn_map_erange(struct map *map, struct symbol *sym, u64 ip)
 static void perf_top__record_precise_ip(struct perf_top *top,
 					struct hist_entry *he,
 					struct perf_sample *sample,
-					struct perf_evsel *evsel, u64 ip)
+					struct evsel *evsel, u64 ip)
 {
 	struct annotation *notes;
 	struct symbol *sym = he->ms.sym;
@@ -228,7 +228,7 @@ static void perf_top__record_precise_ip(struct perf_top *top,
 static void perf_top__show_details(struct perf_top *top)
 {
 	struct hist_entry *he = top->sym_filter_entry;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct annotation *notes;
 	struct symbol *symbol;
 	int more;
@@ -270,7 +270,7 @@ static void perf_top__print_sym_table(struct perf_top *top)
 	char bf[160];
 	int printed = 0;
 	const int win_width = top->winsize.ws_col - 1;
-	struct perf_evsel *evsel = top->sym_evsel;
+	struct evsel *evsel = top->sym_evsel;
 	struct hists *hists = evsel__hists(evsel);
 
 	puts(CONSOLE_CLEAR);
@@ -554,7 +554,7 @@ static bool perf_top__handle_keypress(struct perf_top *top, int c)
 static void perf_top__sort_new_samples(void *arg)
 {
 	struct perf_top *t = arg;
-	struct perf_evsel *evsel = t->sym_evsel;
+	struct evsel *evsel = t->sym_evsel;
 	struct hists *hists;
 
 	if (t->evlist->selected != NULL)
@@ -586,7 +586,7 @@ static void stop_top(void)
 
 static void *display_thread_tui(void *arg)
 {
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_top *top = arg;
 	const char *help = "For a higher level overview, try: perf top --sort comm,dso";
 	struct hist_browser_timer hbt = {
@@ -693,7 +693,7 @@ static int hist_iter__top_callback(struct hist_entry_iter *iter,
 {
 	struct perf_top *top = arg;
 	struct hist_entry *he = iter->he;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 
 	if (perf_hpp_list.sym && single)
 		perf_top__record_precise_ip(top, he, iter->sample, evsel, al->addr);
@@ -705,7 +705,7 @@ static int hist_iter__top_callback(struct hist_entry_iter *iter,
 
 static void perf_event__process_sample(struct perf_tool *tool,
 				       const union perf_event *event,
-				       struct perf_evsel *evsel,
+				       struct evsel *evsel,
 				       struct perf_sample *sample,
 				       struct machine *machine)
 {
@@ -813,7 +813,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
 
 static void
 perf_top__process_lost(struct perf_top *top, union perf_event *event,
-		       struct perf_evsel *evsel)
+		       struct evsel *evsel)
 {
 	struct hists *hists = evsel__hists(evsel);
 
@@ -825,7 +825,7 @@ perf_top__process_lost(struct perf_top *top, union perf_event *event,
 static void
 perf_top__process_lost_samples(struct perf_top *top,
 			       union perf_event *event,
-			       struct perf_evsel *evsel)
+			       struct evsel *evsel)
 {
 	struct hists *hists = evsel__hists(evsel);
 
@@ -912,7 +912,7 @@ static int perf_top__overwrite_check(struct perf_top *top)
 	struct perf_evlist *evlist = top->evlist;
 	struct perf_evsel_config_term *term;
 	struct list_head *config_terms;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int set, overwrite = -1;
 
 	evlist__for_each_entry(evlist, evsel) {
@@ -952,11 +952,11 @@ static int perf_top__overwrite_check(struct perf_top *top)
 }
 
 static int perf_top_overwrite_fallback(struct perf_top *top,
-				       struct perf_evsel *evsel)
+				       struct evsel *evsel)
 {
 	struct record_opts *opts = &top->record_opts;
 	struct perf_evlist *evlist = top->evlist;
-	struct perf_evsel *counter;
+	struct evsel *counter;
 
 	if (!opts->overwrite)
 		return 0;
@@ -975,7 +975,7 @@ static int perf_top_overwrite_fallback(struct perf_top *top,
 static int perf_top__start_counters(struct perf_top *top)
 {
 	char msg[BUFSIZ];
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	struct perf_evlist *evlist = top->evlist;
 	struct record_opts *opts = &top->record_opts;
 
@@ -1104,7 +1104,7 @@ static int deliver_event(struct ordered_events *qe,
 	struct perf_session *session = top->session;
 	union perf_event *event = qevent->event;
 	struct perf_sample sample;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct machine *machine;
 	int ret = -1;
 
tools/perf/builtin-trace.c +38 -38

291 lines not on this page · raw message

tools/perf/tests/backward-ring-buffer.c +1 -1
index 1a9c3becf5ff..921af318507c 100644
@@ -83,7 +83,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
 	int ret = TEST_SKIP, err, sample_count = 0, comm_count = 0;
 	char pid[16], sbuf[STRERR_BUFSIZE];
 	struct perf_evlist *evlist;
-	struct perf_evsel *evsel __maybe_unused;
+	struct evsel *evsel __maybe_unused;
 	struct parse_events_error parse_error;
 	struct record_opts opts = {
 		.target = {
tools/perf/tests/code-reading.c +1 -1
index 88c218eacc43..062d23bba2df 100644
@@ -555,7 +555,7 @@ static int do_test_code_reading(bool try_kcore)
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	int err = -1, ret;
 	pid_t pid;
 	struct map *map;
tools/perf/tests/event-times.c +7 -7
index 684ad56f7b0f..45fe674233d7 100644
@@ -14,7 +14,7 @@
 
 static int attach__enable_on_exec(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct target target = {
 		.uid = UINT_MAX,
 	};
@@ -56,7 +56,7 @@ static int detach__enable_on_exec(struct perf_evlist *evlist)
 
 static int attach__current_disabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
 	int err;
 
@@ -82,7 +82,7 @@ static int attach__current_disabled(struct perf_evlist *evlist)
 
 static int attach__current_enabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
 	int err;
 
@@ -102,14 +102,14 @@ static int attach__current_enabled(struct perf_evlist *evlist)
 
 static int detach__disable(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 
 	return perf_evsel__enable(evsel);
 }
 
 static int attach__cpu_disabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
 	int err;
 
@@ -138,7 +138,7 @@ static int attach__cpu_disabled(struct perf_evlist *evlist)
 
 static int attach__cpu_enabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
 	int err;
 
@@ -163,7 +163,7 @@ static int test_times(int (attach)(struct perf_evlist *),
 {
 	struct perf_counts_values count;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int err = -1, i;
 
 	evlist = perf_evlist__new();
tools/perf/tests/event_update.c +1 -1
index b5042f019ec4..0e5a2e8195e4 100644
@@ -80,7 +80,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	struct perf_evlist *evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct event_name tmp;
 
 	evlist = perf_evlist__new_default();
tools/perf/tests/evsel-roundtrip-name.c +2 -2
index a104728ebf25..bb38489eda1e 100644
@@ -11,7 +11,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 {
 	char name[128];
 	int type, op, err = 0, ret = 0, i, idx;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
@@ -67,7 +67,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 static int __perf_evsel__name_array_test(const char *names[], int nr_names)
 {
 	int i, err;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
tools/perf/tests/evsel-tp-sched.c +2 -2
index 71f60c0f9faa..0170e9d2e329 100644
@@ -5,7 +5,7 @@
 #include "tests.h"
 #include "debug.h"
 
-static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
+static int perf_evsel__test_field(struct evsel *evsel, const char *name,
 				  int size, bool should_be_signed)
 {
 	struct tep_format_field *field = perf_evsel__field(evsel, name);
@@ -35,7 +35,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
 
 int test__perf_evsel__tp_sched_test(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct perf_evsel *evsel = perf_evsel__newtp("sched", "sched_switch");
+	struct evsel *evsel = perf_evsel__newtp("sched", "sched_switch");
 	int ret = 0;
 
 	if (IS_ERR(evsel)) {
tools/perf/tests/hists_cumulate.c +7 -7
index 7a2eed6c783e..b62bf7c3bea2 100644
@@ -80,7 +80,7 @@ static u64 fake_callchains[][10] = {
 static int add_hist_entries(struct hists *hists, struct machine *machine)
 {
 	struct addr_location al;
-	struct perf_evsel *evsel = hists_to_evsel(hists);
+	struct evsel *evsel = hists_to_evsel(hists);
 	struct perf_sample sample = { .period = 1000, };
 	size_t i;
 
@@ -147,7 +147,7 @@ static void del_hist_entries(struct hists *hists)
 	}
 }
 
-typedef int (*test_fn_t)(struct perf_evsel *, struct machine *);
+typedef int (*test_fn_t)(struct evsel *, struct machine *);
 
 #define COMM(he)  (thread__comm_str(he->thread))
 #define DSO(he)   (he->ms.map->dso->short_name)
@@ -247,7 +247,7 @@ static int do_test(struct hists *hists, struct result *expected, size_t nr_expec
 }
 
 /* NO callchain + NO children */
-static int test1(struct perf_evsel *evsel, struct machine *machine)
+static int test1(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -298,7 +298,7 @@ static int test1(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* callcain + NO children */
-static int test2(struct perf_evsel *evsel, struct machine *machine)
+static int test2(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -446,7 +446,7 @@ static int test2(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* NO callchain + children */
-static int test3(struct perf_evsel *evsel, struct machine *machine)
+static int test3(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -503,7 +503,7 @@ static int test3(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* callchain + children */
-static int test4(struct perf_evsel *evsel, struct machine *machine)
+static int test4(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -694,7 +694,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
 	int err = TEST_FAIL;
 	struct machines machines;
 	struct machine *machine;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
tools/perf/tests/hists_filter.c +2 -2
index 975844807fe2..3e679bb8da7f 100644
@@ -50,7 +50,7 @@ static struct sample fake_samples[] = {
 static int add_hist_entries(struct perf_evlist *evlist,
 			    struct machine *machine)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct addr_location al;
 	struct perf_sample sample = { .period = 100, };
 	size_t i;
@@ -108,7 +108,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
 	int err = TEST_FAIL;
 	struct machines machines;
 	struct machine *machine;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 
 	TEST_ASSERT_VAL("No memory", evlist);
tools/perf/tests/hists_link.c +2 -2
index af633db63f4d..078ee9876980 100644
@@ -64,7 +64,7 @@ static struct sample fake_samples[][5] = {
 
 static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct addr_location al;
 	struct hist_entry *he;
 	struct perf_sample sample = { .period = 1, .weight = 1, };
@@ -271,7 +271,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
 	struct hists *hists, *first_hists;
 	struct machines machines;
 	struct machine *machine = NULL;
-	struct perf_evsel *evsel, *first;
+	struct evsel *evsel, *first;
 	struct perf_evlist *evlist = perf_evlist__new();
 
 	if (evlist == NULL)
tools/perf/tests/hists_output.c +8 -8
index 0a510c524a5d..5cd4b1baa9d1 100644
@@ -50,7 +50,7 @@ static struct sample fake_samples[] = {
 static int add_hist_entries(struct hists *hists, struct machine *machine)
 {
 	struct addr_location al;
-	struct perf_evsel *evsel = hists_to_evsel(hists);
+	struct evsel *evsel = hists_to_evsel(hists);
 	struct perf_sample sample = { .period = 100, };
 	size_t i;
 
@@ -113,7 +113,7 @@ static void del_hist_entries(struct hists *hists)
 	}
 }
 
-typedef int (*test_fn_t)(struct perf_evsel *, struct machine *);
+typedef int (*test_fn_t)(struct evsel *, struct machine *);
 
 #define COMM(he)  (thread__comm_str(he->thread))
 #define DSO(he)   (he->ms.map->dso->short_name)
@@ -122,7 +122,7 @@ typedef int (*test_fn_t)(struct perf_evsel *, struct machine *);
 #define PID(he)   (he->thread->tid)
 
 /* default sort keys (no field) */
-static int test1(struct perf_evsel *evsel, struct machine *machine)
+static int test1(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -224,7 +224,7 @@ static int test1(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* mixed fields and sort keys */
-static int test2(struct perf_evsel *evsel, struct machine *machine)
+static int test2(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -280,7 +280,7 @@ static int test2(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* fields only (no sort key) */
-static int test3(struct perf_evsel *evsel, struct machine *machine)
+static int test3(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -354,7 +354,7 @@ static int test3(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* handle duplicate 'dso' field */
-static int test4(struct perf_evsel *evsel, struct machine *machine)
+static int test4(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -456,7 +456,7 @@ static int test4(struct perf_evsel *evsel, struct machine *machine)
 }
 
 /* full sort keys w/o overhead field */
-static int test5(struct perf_evsel *evsel, struct machine *machine)
+static int test5(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -580,7 +580,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
 	int err = TEST_FAIL;
 	struct machines machines;
 	struct machine *machine;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
tools/perf/tests/keep-tracking.c +1 -1
index e1e5e32cbb53..8ada3e63f1ba 100644
@@ -68,7 +68,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	int found, err = -1;
 	const char *comm;
 
tools/perf/tests/mmap-basic.c +1 -1
index c1e2fe087b67..76ee42eb1355 100644
@@ -36,7 +36,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 #define nsyscalls ARRAY_SIZE(syscall_names)
 	unsigned int nr_events[nsyscalls],
 		     expected_nr_events[nsyscalls], i, j;
-	struct perf_evsel *evsels[nsyscalls], *evsel;
+	struct evsel *evsels[nsyscalls], *evsel;
 	char sbuf[STRERR_BUFSIZE];
 	struct perf_mmap *md;
 
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
index 9cd5bf63bec1..4bf73896695a 100644
@@ -21,7 +21,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
 {
 	int err = -1, fd, cpu;
 	struct perf_cpu_map *cpus;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
 	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
tools/perf/tests/openat-syscall-tp-fields.c +1 -1
index 344dc3ac2469..2e467448e220 100644
@@ -33,7 +33,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
 	const char *filename = "/etc/passwd";
 	int flags = O_RDONLY | O_DIRECTORY;
 	struct perf_evlist *evlist = perf_evlist__new();
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int err = -1, i, nr_events = 0, nr_polls = 0;
 	char sbuf[STRERR_BUFSIZE];
 
tools/perf/tests/openat-syscall.c +1 -1
index 652b8328ca93..f3efadd05863 100644
@@ -14,7 +14,7 @@
 int test__openat_syscall_event(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	int err = -1, fd;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
tools/perf/tests/parse-events.c +60 -60

472 lines not on this page · raw message

tools/perf/tests/perf-record.c +1 -1
index 07f6bd8ed719..7e576c2db941 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/sample-parsing.c +1 -1
index 361714e2583c..a8cd3ed3c116 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/sw-clock.c +1 -1
index d57b8d9c1575..620a99aad1e3 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/switch-tracking.c +5 -5
index 3652c548cc22..a946b9fa60dd 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/task-exit.c +1 -1
index 9602ff91a3c7..e6fb4b8d8bc2 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/annotate.c +7 -7
index e67880bf1efe..64cc650c4543 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/hists.c +20 -20
index a94eb0755e8b..9bc818621eb6 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/res_sample.c +1 -1
index 8aa3547bb9ff..7f3576deafd7 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/scripts.c +2 -2
index 4d565cc14076..c0462457e9f9 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/gtk/annotate.c +3 -3
index 3af87c18a914..40e263a730e4 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/gtk/gtk.h +2 -2
index 9846ea5c831b..e2f5fbef3c9a 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/gtk/hists.c +1 -1
index 3955ed1d1bd9..d5c9fe230632 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/hist.c +4 -4
index 412d6f1626e3..214af526901b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/annotate.c +16 -16
index ac9ad2330f93..6ea5d678a81c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/annotate.h +13 -13
index 5bc0cf655d37..7c42f320efa2 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/auxtrace.c +4 -4
index ec0af36697c4..98b151bc9a36 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/bpf-loader.c +6 -6
index 6d0dfb777a79..594ea279e25b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/bpf-loader.h +3 -3
index 8c3441a4b72c..e2048c978a24 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/build-id.c +1 -1
index f1abfab7aa8c..b98754863de9 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/build-id.h +1 -1
index 93668f38f1ed..aad419bb165c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/callchain.c +1 -1
index 8d7d8f62fcca..d077704f9afa 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/callchain.h +1 -1
index 80e056a3d882..45b9ed49e2b1 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/cgroup.c +5 -5
index 484c29830a81..4f5c326a9477 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/counts.c +3 -3
index 01ee81df3fe5..f94e1a23dad6 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/counts.h +3 -3
index 460b56ce3252..0f0cb2d8f70d 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/cs-etm.c +2 -2
index 3d1c34fc4d68..5a9fcb60ec88 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/data-convert-bt.c +9 -9
index ddbcd59f2d9b..042ee5b6f9f1 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/db-export.c +3 -3
index ffbb3e7d3288..dc2d4de772e3 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/db-export.h +5 -5
index ba1f62a5fe10..9c3d38f5a40d 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/evlist.c +71 -71

142 lines not on this page · raw message

tools/perf/util/evlist.h +23 -23

46 lines not on this page · raw message

tools/perf/util/evsel.c +84 -84

168 lines not on this page · raw message

tools/perf/util/evsel.h +73 -73

146 lines not on this page · raw message

tools/perf/util/evsel_fprintf.c +2 -2
index 95ea147f9e18..1fddb7da4b51 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/header.c +29 -29

58 lines not on this page · raw message

tools/perf/util/header.h +4 -4
index 5b3abe4172e2..437d8617de27 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.c +13 -13
index f24fd1954f6c..3da49c479880 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.h +14 -14
index 24635f36148d..9bf247c638b8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-bts.c +1 -1
index 5560e95afdda..8fd46d5f4b39 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-pt.c +18 -18
index df061599fef4..f1595b86d7c7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/jitdump.c +2 -2
index 18c34f0c1966..8df60703411a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/kvm-stat.h +9 -9
index 1403dec189b4..299edd32d3d4 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/machine.c +3 -3
index a2359a33c748..ec0675b0caa8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/machine.h +2 -2
index 7f64016758e0..ef803f08ae12 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/map.h +1 -1
index dc93787c74f0..c3614195ddc7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/metricgroup.c +11 -11
index 416a9015405e..14c423974d63 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/metricgroup.h +3 -3
index 5c52097a5c63..500e828533f8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/parse-events.c +24 -24

48 lines not on this page · raw message

tools/perf/util/parse-events.h +1 -1
index f7139e1a2fd3..99e206598b60 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/python.c +7 -7
index 62dda70227e5..beafbd469b0c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/record.c +8 -8
index 051c67f82548..ef8f686729fd 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/s390-cpumsf.c +1 -1
index 83d2e149ef19..59d78a9fe703 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/s390-sample-raw.c +1 -1
index 6650f599ed9c..159a08220947 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/scripting-engines/trace-event-perl.c +4 -4
index 61aa7f3df915..98dcdb9a79a4 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/scripting-engines/trace-event-python.c +11 -11
index 0a7e662036b4..106aec31c07c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.c +15 -15
index 69d1d158a610..e9d1cf8eb274 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.h +4 -4
index 863dbad87849..2b2427c4c0b9 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sort.c +14 -14
index 5d2518e89fc4..133d3a45997f 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-display.c +30 -30

60 lines not on this page · raw message

tools/perf/util/stat-shadow.c +19 -19
index accb1bf1cfd8..8c19f3149f34 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.c +19 -19
index 62791c063f7a..7acb9a6730fe 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.h +7 -7
index fa675d09febd..b64cf0177a91 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/tool.h +2 -2
index 9096a6e3de59..5d880a6f0a34 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/top.c +1 -1
index 251bbf124fb0..9f098db76e3c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/top.h +2 -2
index 19f95eaf75c8..7e0f363c0658 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/trace-event-info.c +2 -2
index 4550015b9d5d..d7ae0627ac47 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/trace-event-scripting.c +1 -1
index ba58f69777a1..dfd2640c763a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/trace-event.h +2 -2
index c7002fe11673..258d79071d81 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.21.0

Part of the diff is not shown here. View the raw message.

#8 lore raw

[tip:perf/core] perf evsel: Rename struct perf_evsel to struct evsel

perf evsel: Rename struct perf_evsel to struct evsel
Commit-ID:  32dcd021d004038ca12ac17319da5aa4756e9312
Gitweb:     https://git.kernel.org/tip/32dcd021d004038ca12ac17319da5aa4756e9312
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:51 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf evsel: Rename struct perf_evsel to struct evsel

Rename struct perf_evsel to struct evsel, so we don't have a name clash when we add struct perf_evsel in libperf.

Committer notes:

Added fixes for arm64, provided by Jiri.

---
 tools/perf/arch/arm/util/auxtrace.c                |   2 +-
 tools/perf/arch/arm/util/cs-etm.c                  |  20 +--
 tools/perf/arch/arm64/util/arm-spe.c               |   6 +-
 tools/perf/arch/powerpc/util/kvm-stat.c            |   6 +-
 tools/perf/arch/s390/util/auxtrace.c               |   2 +-
 tools/perf/arch/s390/util/kvm-stat.c               |   8 +-
 tools/perf/arch/x86/tests/intel-cqm.c              |   2 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c       |   2 +-
 tools/perf/arch/x86/util/auxtrace.c                |   2 +-
 tools/perf/arch/x86/util/intel-bts.c               |  10 +-
 tools/perf/arch/x86/util/intel-pt.c                |  20 +--
 tools/perf/arch/x86/util/kvm-stat.c                |  12 +-
 tools/perf/builtin-annotate.c                      |  16 +-
 tools/perf/builtin-c2c.c                           |   4 +-
 tools/perf/builtin-diff.c                          |  12 +-
 tools/perf/builtin-evlist.c                        |   2 +-
 tools/perf/builtin-inject.c                        |  30 ++--
 tools/perf/builtin-kmem.c                          |  24 +--
 tools/perf/builtin-kvm.c                           |  20 +--
 tools/perf/builtin-lock.c                          |  30 ++--
 tools/perf/builtin-mem.c                           |   2 +-
 tools/perf/builtin-record.c                        |   4 +-
 tools/perf/builtin-report.c                        |  22 +--
 tools/perf/builtin-sched.c                         |  74 ++++-----
 tools/perf/builtin-script.c                        |  90 +++++------
 tools/perf/builtin-stat.c                          |  18 +--
 tools/perf/builtin-timechart.c                     |  44 +++---
 tools/perf/builtin-top.c                           |  30 ++--
 tools/perf/builtin-trace.c                         |  76 +++++-----
 tools/perf/tests/backward-ring-buffer.c            |   2 +-
 tools/perf/tests/code-reading.c                    |   2 +-
 tools/perf/tests/event-times.c                     |  14 +-
 tools/perf/tests/event_update.c                    |   2 +-
 tools/perf/tests/evsel-roundtrip-name.c            |   4 +-
 tools/perf/tests/evsel-tp-sched.c                  |   4 +-
 tools/perf/tests/hists_cumulate.c                  |  14 +-
 tools/perf/tests/hists_filter.c                    |   4 +-
 tools/perf/tests/hists_link.c                      |   4 +-
 tools/perf/tests/hists_output.c                    |  16 +-
 tools/perf/tests/keep-tracking.c                   |   2 +-
 tools/perf/tests/mmap-basic.c                      |   2 +-
 tools/perf/tests/openat-syscall-all-cpus.c         |   2 +-
 tools/perf/tests/openat-syscall-tp-fields.c        |   2 +-
 tools/perf/tests/openat-syscall.c                  |   2 +-
 tools/perf/tests/parse-events.c                    | 120 +++++++--------
 tools/perf/tests/perf-record.c                     |   2 +-
 tools/perf/tests/sample-parsing.c                  |   2 +-
 tools/perf/tests/sw-clock.c                        |   2 +-
 tools/perf/tests/switch-tracking.c                 |  10 +-
 tools/perf/tests/task-exit.c                       |   2 +-
 tools/perf/ui/browsers/annotate.c                  |  14 +-
 tools/perf/ui/browsers/hists.c                     |  40 ++---
 tools/perf/ui/browsers/res_sample.c                |   2 +-
 tools/perf/ui/browsers/scripts.c                   |   4 +-
 tools/perf/ui/gtk/annotate.c                       |   6 +-
 tools/perf/ui/gtk/gtk.h                            |   4 +-
 tools/perf/ui/gtk/hists.c                          |   2 +-
 tools/perf/ui/hist.c                               |   8 +-
 tools/perf/util/annotate.c                         |  32 ++--
 tools/perf/util/annotate.h                         |  26 ++--
 tools/perf/util/auxtrace.c                         |   8 +-
 tools/perf/util/bpf-loader.c                       |  12 +-
 tools/perf/util/bpf-loader.h                       |   6 +-
 tools/perf/util/build-id.c                         |   2 +-
 tools/perf/util/build-id.h                         |   2 +-
 tools/perf/util/callchain.c                        |   2 +-
 tools/perf/util/callchain.h                        |   2 +-
 tools/perf/util/cgroup.c                           |  10 +-
 tools/perf/util/counts.c                           |   6 +-
 tools/perf/util/counts.h                           |   6 +-
 tools/perf/util/cs-etm.c                           |   4 +-
 tools/perf/util/data-convert-bt.c                  |  18 +--
 tools/perf/util/db-export.c                        |   6 +-
 tools/perf/util/db-export.h                        |  10 +-
 tools/perf/util/evlist.c                           | 142 ++++++++---------
 tools/perf/util/evlist.h                           |  46 +++---
 tools/perf/util/evsel.c                            | 168 ++++++++++-----------
 tools/perf/util/evsel.h                            | 146 +++++++++---------
 tools/perf/util/evsel_fprintf.c                    |   4 +-
 tools/perf/util/header.c                           |  58 +++----
 tools/perf/util/header.h                           |   8 +-
 tools/perf/util/hist.c                             |  26 ++--
 tools/perf/util/hist.h                             |  28 ++--
 tools/perf/util/intel-bts.c                        |   2 +-
 tools/perf/util/intel-pt.c                         |  36 ++---
 tools/perf/util/jitdump.c                          |   4 +-
 tools/perf/util/kvm-stat.h                         |  18 +--
 tools/perf/util/machine.c                          |   6 +-
 tools/perf/util/machine.h                          |   4 +-
 tools/perf/util/map.h                              |   2 +-
 tools/perf/util/metricgroup.c                      |  22 +--
 tools/perf/util/metricgroup.h                      |   6 +-
 tools/perf/util/parse-events.c                     |  48 +++---
 tools/perf/util/parse-events.h                     |   2 +-
 tools/perf/util/python.c                           |  14 +-
 tools/perf/util/record.c                           |  16 +-
 tools/perf/util/s390-cpumsf.c                      |   2 +-
 tools/perf/util/s390-sample-raw.c                  |   2 +-
 .../perf/util/scripting-engines/trace-event-perl.c |   8 +-
 .../util/scripting-engines/trace-event-python.c    |  22 +--
 tools/perf/util/session.c                          |  30 ++--
 tools/perf/util/session.h                          |   8 +-
 tools/perf/util/sort.c                             |  28 ++--
 tools/perf/util/stat-display.c                     |  60 ++++----
 tools/perf/util/stat-shadow.c                      |  38 ++---
 tools/perf/util/stat.c                             |  38 ++---
 tools/perf/util/stat.h                             |  14 +-
 tools/perf/util/tool.h                             |   4 +-
 tools/perf/util/top.c                              |   2 +-
 tools/perf/util/top.h                              |   4 +-
 tools/perf/util/trace-event-info.c                 |   4 +-
 tools/perf/util/trace-event-scripting.c            |   2 +-
 tools/perf/util/trace-event.h                      |   4 +-
 113 files changed, 1056 insertions(+), 1056 deletions(-)
tools/perf/arch/arm/util/auxtrace.c +1 -1
index 02014740a1aa..fd17dccfcb0b 100644
@@ -53,7 +53,7 @@ struct auxtrace_record
 *auxtrace_record__init(struct perf_evlist *evlist, int *err)
 {
 	struct perf_pmu	*cs_etm_pmu;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	bool found_etm = false;
 	bool found_spe = false;
 	static struct perf_pmu **arm_spe_pmus = NULL;
tools/perf/arch/arm/util/cs-etm.c +10 -10
index d08b55c27774..476f845be5fe 100644
@@ -55,7 +55,7 @@ static const char *metadata_etmv4_ro[CS_ETMV4_PRIV_MAX] = {
 static bool cs_etm_is_etmv4(struct auxtrace_record *itr, int cpu);
 
 static int cs_etm_set_context_id(struct auxtrace_record *itr,
-				 struct perf_evsel *evsel, int cpu)
+				 struct evsel *evsel, int cpu)
 {
 	struct cs_etm_recording *ptr;
 	struct perf_pmu *cs_etm_pmu;
@@ -104,7 +104,7 @@ out:
 }
 
 static int cs_etm_set_timestamp(struct auxtrace_record *itr,
-				struct perf_evsel *evsel, int cpu)
+				struct evsel *evsel, int cpu)
 {
 	struct cs_etm_recording *ptr;
 	struct perf_pmu *cs_etm_pmu;
@@ -152,7 +152,7 @@ out:
 }
 
 static int cs_etm_set_option(struct auxtrace_record *itr,
-			     struct perf_evsel *evsel, u32 option)
+			     struct evsel *evsel, u32 option)
 {
 	int i, err = -EINVAL;
 	struct perf_cpu_map *event_cpus = evsel->evlist->cpus;
@@ -208,7 +208,7 @@ static int cs_etm_parse_snapshot_options(struct auxtrace_record *itr,
 }
 
 static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
-				struct perf_evsel *evsel)
+				struct evsel *evsel)
 {
 	char msg[BUFSIZ], path[PATH_MAX], *sink;
 	struct perf_evsel_config_term *term;
@@ -252,7 +252,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
 	struct cs_etm_recording *ptr =
 				container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
-	struct perf_evsel *evsel, *cs_etm_evsel = NULL;
+	struct evsel *evsel, *cs_etm_evsel = NULL;
 	struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = (geteuid() == 0 || perf_event_paranoid() < 0);
 	int err = 0;
@@ -407,7 +407,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
 
 	/* Add dummy event to keep tracking */
 	if (opts->full_auxtrace) {
-		struct perf_evsel *tracking_evsel;
+		struct evsel *tracking_evsel;
 
 		err = parse_events(evlist, "dummy:u", NULL);
 		if (err)
@@ -435,7 +435,7 @@ static u64 cs_etm_get_config(struct auxtrace_record *itr)
 			container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
 	struct perf_evlist *evlist = ptr->evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
 		if (evsel->attr.type == cs_etm_pmu->type) {
@@ -817,7 +817,7 @@ static int cs_etm_snapshot_start(struct auxtrace_record *itr)
 {
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->cs_etm_pmu->type)
@@ -830,7 +830,7 @@ static int cs_etm_snapshot_finish(struct auxtrace_record *itr)
 {
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->cs_etm_pmu->type)
@@ -858,7 +858,7 @@ static int cs_etm_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->cs_etm_pmu->type)
tools/perf/arch/arm64/util/arm-spe.c +3 -3
index 2c009aa74633..103bf20ae32a 100644
@@ -65,9 +65,9 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
 	struct arm_spe_recording *sper =
 			container_of(itr, struct arm_spe_recording, itr);
 	struct perf_pmu *arm_spe_pmu = sper->arm_spe_pmu;
-	struct perf_evsel *evsel, *arm_spe_evsel = NULL;
+	struct evsel *evsel, *arm_spe_evsel = NULL;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
-	struct perf_evsel *tracking_evsel;
+	struct evsel *tracking_evsel;
 	int err;
 
 	sper->evlist = evlist;
@@ -160,7 +160,7 @@ static int arm_spe_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct arm_spe_recording *sper =
 			container_of(itr, struct arm_spe_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(sper->evlist, evsel) {
 		if (evsel->attr.type == sper->arm_spe_pmu->type)
tools/perf/arch/powerpc/util/kvm-stat.c +3 -3
index f9db341c47b6..557c474f0a4b 100644
@@ -32,7 +32,7 @@ const char *ppc_book3s_hv_kvm_tp[] = {
 const char *kvm_events_tp[NR_TPS + 1];
 const char *kvm_exit_reason;
 
-static void hcall_event_get_key(struct perf_evsel *evsel,
+static void hcall_event_get_key(struct evsel *evsel,
 				struct perf_sample *sample,
 				struct event_key *key)
 {
@@ -55,14 +55,14 @@ static const char *get_hcall_exit_reason(u64 exit_code)
 	return "UNKNOWN";
 }
 
-static bool hcall_event_end(struct perf_evsel *evsel,
+static bool hcall_event_end(struct evsel *evsel,
 			    struct perf_sample *sample __maybe_unused,
 			    struct event_key *key __maybe_unused)
 {
 	return (!strcmp(evsel->name, kvm_events_tp[3]));
 }
 
-static bool hcall_event_begin(struct perf_evsel *evsel,
+static bool hcall_event_begin(struct evsel *evsel,
 			      struct perf_sample *sample, struct event_key *key)
 {
 	if (!strcmp(evsel->name, kvm_events_tp[2])) {
tools/perf/arch/s390/util/auxtrace.c +1 -1
index 0fe1be93f375..aec819b945c5 100644
@@ -86,7 +86,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
 					      int *err)
 {
 	struct auxtrace_record *aux;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	int diagnose = 0;
 
 	*err = 0;
tools/perf/arch/s390/util/kvm-stat.c +4 -4
index f852f2a77e0a..dac78441338c 100644
@@ -23,7 +23,7 @@ const char *kvm_exit_reason = "icptcode";
 const char *kvm_entry_trace = "kvm:kvm_s390_sie_enter";
 const char *kvm_exit_trace = "kvm:kvm_s390_sie_exit";
 
-static void event_icpt_insn_get_key(struct perf_evsel *evsel,
+static void event_icpt_insn_get_key(struct evsel *evsel,
 				    struct perf_sample *sample,
 				    struct event_key *key)
 {
@@ -34,7 +34,7 @@ static void event_icpt_insn_get_key(struct perf_evsel *evsel,
 	key->exit_reasons = sie_icpt_insn_codes;
 }
 
-static void event_sigp_get_key(struct perf_evsel *evsel,
+static void event_sigp_get_key(struct evsel *evsel,
 			       struct perf_sample *sample,
 			       struct event_key *key)
 {
@@ -42,7 +42,7 @@ static void event_sigp_get_key(struct perf_evsel *evsel,
 	key->exit_reasons = sie_sigp_order_codes;
 }
 
-static void event_diag_get_key(struct perf_evsel *evsel,
+static void event_diag_get_key(struct evsel *evsel,
 			       struct perf_sample *sample,
 			       struct event_key *key)
 {
@@ -50,7 +50,7 @@ static void event_diag_get_key(struct perf_evsel *evsel,
 	key->exit_reasons = sie_diagnose_codes;
 }
 
-static void event_icpt_prog_get_key(struct perf_evsel *evsel,
+static void event_icpt_prog_get_key(struct evsel *evsel,
 				    struct perf_sample *sample,
 				    struct event_key *key)
 {
tools/perf/arch/x86/tests/intel-cqm.c +1 -1
index 94aa0b673b7f..b88ed71b2e3f 100644
@@ -41,7 +41,7 @@ static pid_t spawn(void)
 int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	struct perf_event_attr pe;
 	int i, fd[2], flag, ret;
 	size_t mmap_len;
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index f542b878bdb5..43fc7d426d93 100644
@@ -52,7 +52,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	int err = -1, ret, i;
 	const char *comm1, *comm2;
 	struct perf_tsc_conversion tc;
tools/perf/arch/x86/util/auxtrace.c +1 -1
index d711268af330..02f192114448 100644
@@ -21,7 +21,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
 {
 	struct perf_pmu *intel_pt_pmu;
 	struct perf_pmu *intel_bts_pmu;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	bool found_pt = false;
 	bool found_bts = false;
 
tools/perf/arch/x86/util/intel-bts.c +5 -5
index da1583d27efd..59685a19c3b9 100644
@@ -105,7 +105,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
 	struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu;
-	struct perf_evsel *evsel, *intel_bts_evsel = NULL;
+	struct evsel *evsel, *intel_bts_evsel = NULL;
 	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 
@@ -220,7 +220,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
 
 	/* Add dummy event to keep tracking */
 	if (opts->full_auxtrace) {
-		struct perf_evsel *tracking_evsel;
+		struct evsel *tracking_evsel;
 		int err;
 
 		err = parse_events(evlist, "dummy:u", NULL);
@@ -313,7 +313,7 @@ static int intel_bts_snapshot_start(struct auxtrace_record *itr)
 {
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(btsr->evlist, evsel) {
 		if (evsel->attr.type == btsr->intel_bts_pmu->type)
@@ -326,7 +326,7 @@ static int intel_bts_snapshot_finish(struct auxtrace_record *itr)
 {
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(btsr->evlist, evsel) {
 		if (evsel->attr.type == btsr->intel_bts_pmu->type)
@@ -408,7 +408,7 @@ static int intel_bts_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct intel_bts_recording *btsr =
 			container_of(itr, struct intel_bts_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(btsr->evlist, evsel) {
 		if (evsel->attr.type == btsr->intel_bts_pmu->type)
tools/perf/arch/x86/util/intel-pt.c +10 -10
index 69a23e40abc9..b42df73fd7ff 100644
@@ -112,7 +112,7 @@ static u64 intel_pt_masked_bits(u64 mask, u64 bits)
 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
 				struct perf_evlist *evlist, u64 *res)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	u64 mask;
 
 	*res = 0;
@@ -271,7 +271,7 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
 static const char *intel_pt_find_filter(struct perf_evlist *evlist,
 					struct perf_pmu *intel_pt_pmu)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
 		if (evsel->attr.type == intel_pt_pmu->type)
@@ -401,7 +401,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr,
 static int intel_pt_track_switches(struct perf_evlist *evlist)
 {
 	const char *sched_switch = "sched:sched_switch";
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int err;
 
 	if (!perf_evlist__can_select_event(evlist, sched_switch))
@@ -513,7 +513,7 @@ out_err:
 }
 
 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
-				    struct perf_evsel *evsel)
+				    struct evsel *evsel)
 {
 	int err;
 	char c;
@@ -556,7 +556,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 			container_of(itr, struct intel_pt_recording, itr);
 	struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu;
 	bool have_timing_info, need_immediate = false;
-	struct perf_evsel *evsel, *intel_pt_evsel = NULL;
+	struct evsel *evsel, *intel_pt_evsel = NULL;
 	const struct perf_cpu_map *cpus = evlist->cpus;
 	bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
 	u64 tsc_bit;
@@ -685,7 +685,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 					!target__has_task(&opts->target);
 
 			if (!cpu_wide && perf_can_record_cpu_wide()) {
-				struct perf_evsel *switch_evsel;
+				struct evsel *switch_evsel;
 
 				err = parse_events(evlist, "dummy:u", NULL);
 				if (err)
@@ -743,7 +743,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 
 	/* Add dummy event to keep tracking */
 	if (opts->full_auxtrace) {
-		struct perf_evsel *tracking_evsel;
+		struct evsel *tracking_evsel;
 
 		err = parse_events(evlist, "dummy:u", NULL);
 		if (err)
@@ -784,7 +784,7 @@ static int intel_pt_snapshot_start(struct auxtrace_record *itr)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->intel_pt_pmu->type)
@@ -797,7 +797,7 @@ static int intel_pt_snapshot_finish(struct auxtrace_record *itr)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->intel_pt_pmu->type)
@@ -1070,7 +1070,7 @@ static int intel_pt_read_finish(struct auxtrace_record *itr, int idx)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(ptr->evlist, evsel) {
 		if (evsel->attr.type == ptr->intel_pt_pmu->type)
tools/perf/arch/x86/util/kvm-stat.c +6 -6
index 865a9762f22e..54a3f2373c35 100644
@@ -27,7 +27,7 @@ const char *kvm_exit_trace = "kvm:kvm_exit";
  * the time of MMIO write: kvm_mmio(KVM_TRACE_MMIO_WRITE...) -> kvm_entry
  * the time of MMIO read: kvm_exit -> kvm_mmio(KVM_TRACE_MMIO_READ...).
  */
-static void mmio_event_get_key(struct perf_evsel *evsel, struct perf_sample *sample,
+static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample,
 			       struct event_key *key)
 {
 	key->key  = perf_evsel__intval(evsel, sample, "gpa");
@@ -38,7 +38,7 @@ static void mmio_event_get_key(struct perf_evsel *evsel, struct perf_sample *sam
 #define KVM_TRACE_MMIO_READ 1
 #define KVM_TRACE_MMIO_WRITE 2
 
-static bool mmio_event_begin(struct perf_evsel *evsel,
+static bool mmio_event_begin(struct evsel *evsel,
 			     struct perf_sample *sample, struct event_key *key)
 {
 	/* MMIO read begin event in kernel. */
@@ -55,7 +55,7 @@ static bool mmio_event_begin(struct perf_evsel *evsel,
 	return false;
 }
 
-static bool mmio_event_end(struct perf_evsel *evsel, struct perf_sample *sample,
+static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample,
 			   struct event_key *key)
 {
 	/* MMIO write end event in kernel. */
@@ -89,7 +89,7 @@ static struct kvm_events_ops mmio_events = {
 };
 
  /* The time of emulation pio access is from kvm_pio to kvm_entry. */
-static void ioport_event_get_key(struct perf_evsel *evsel,
+static void ioport_event_get_key(struct evsel *evsel,
 				 struct perf_sample *sample,
 				 struct event_key *key)
 {
@@ -97,7 +97,7 @@ static void ioport_event_get_key(struct perf_evsel *evsel,
 	key->info = perf_evsel__intval(evsel, sample, "rw");
 }
 
-static bool ioport_event_begin(struct perf_evsel *evsel,
+static bool ioport_event_begin(struct evsel *evsel,
 			       struct perf_sample *sample,
 			       struct event_key *key)
 {
@@ -109,7 +109,7 @@ static bool ioport_event_begin(struct perf_evsel *evsel,
 	return false;
 }
 
-static bool ioport_event_end(struct perf_evsel *evsel,
+static bool ioport_event_end(struct evsel *evsel,
 			     struct perf_sample *sample __maybe_unused,
 			     struct event_key *key __maybe_unused)
 {
tools/perf/builtin-annotate.c +8 -8
index e0aa14faf2b5..9bb637165bf9 100644
@@ -156,7 +156,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
 	struct hist_entry *he = iter->he;
 	struct branch_info *bi;
 	struct perf_sample *sample = iter->sample;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 	int err;
 
 	bi = he->branch_info;
@@ -171,7 +171,7 @@ out:
 	return err;
 }
 
-static int process_branch_callback(struct perf_evsel *evsel,
+static int process_branch_callback(struct evsel *evsel,
 				   struct perf_sample *sample,
 				   struct addr_location *al __maybe_unused,
 				   struct perf_annotate *ann,
@@ -208,7 +208,7 @@ static bool has_annotation(struct perf_annotate *ann)
 	return ui__has_annotation() || ann->use_stdio2;
 }
 
-static int perf_evsel__add_sample(struct perf_evsel *evsel,
+static int perf_evsel__add_sample(struct evsel *evsel,
 				  struct perf_sample *sample,
 				  struct addr_location *al,
 				  struct perf_annotate *ann,
@@ -257,7 +257,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool);
@@ -293,7 +293,7 @@ static int process_feature_event(struct perf_session *session,
 }
 
 static int hist_entry__tty_annotate(struct hist_entry *he,
-				    struct perf_evsel *evsel,
+				    struct evsel *evsel,
 				    struct perf_annotate *ann)
 {
 	if (!ann->use_stdio2)
@@ -303,7 +303,7 @@ static int hist_entry__tty_annotate(struct hist_entry *he,
 }
 
 static void hists__find_annotations(struct hists *hists,
-				    struct perf_evsel *evsel,
+				    struct evsel *evsel,
 				    struct perf_annotate *ann)
 {
 	struct rb_node *nd = rb_first_cached(&hists->entries), *next;
@@ -333,7 +333,7 @@ find_next:
 		if (use_browser == 2) {
 			int ret;
 			int (*annotate)(struct hist_entry *he,
-					struct perf_evsel *evsel,
+					struct evsel *evsel,
 					struct hist_browser_timer *hbt);
 
 			annotate = dlsym(perf_gtk_handle,
@@ -387,7 +387,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 {
 	int ret;
 	struct perf_session *session = ann->session;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	u64 total_nr_samples;
 
 	if (ann->cpu_list) {
tools/perf/builtin-c2c.c +2 -2
index 52035dacf253..d251a486f329 100644
@@ -248,7 +248,7 @@ static void compute_stats(struct c2c_hist_entry *c2c_he,
 static int process_sample_event(struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct c2c_hists *c2c_hists = &c2c.hists;
@@ -2237,7 +2237,7 @@ static void print_pareto(FILE *out)
 static void print_c2c_info(FILE *out, struct perf_session *session)
 {
 	struct perf_evlist *evlist = session->evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	bool first = true;
 
 	fprintf(out, "=================================================\n");
tools/perf/builtin-diff.c +6 -6
index f6f5dd15bea7..c3b4b8196e00 100644
@@ -376,7 +376,7 @@ struct hist_entry_ops block_hist_ops = {
 static int diff__process_sample_event(struct perf_tool *tool,
 				      union perf_event *event,
 				      struct perf_sample *sample,
-				      struct perf_evsel *evsel,
+				      struct evsel *evsel,
 				      struct machine *machine)
 {
 	struct perf_diff *pdiff = container_of(tool, struct perf_diff, tool);
@@ -448,10 +448,10 @@ static struct perf_diff pdiff = {
 	},
 };
 
-static struct perf_evsel *evsel_match(struct perf_evsel *evsel,
+static struct evsel *evsel_match(struct evsel *evsel,
 				      struct perf_evlist *evlist)
 {
-	struct perf_evsel *e;
+	struct evsel *e;
 
 	evlist__for_each_entry(evlist, e) {
 		if (perf_evsel__match2(evsel, e))
@@ -463,7 +463,7 @@ static struct perf_evsel *evsel_match(struct perf_evsel *evsel,
 
 static void perf_evlist__collapse_resort(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
 		struct hists *hists = evsel__hists(evsel);
@@ -1010,7 +1010,7 @@ static void data__fprintf(void)
 static void data_process(void)
 {
 	struct perf_evlist *evlist_base = data__files[0].session->evlist;
-	struct perf_evsel *evsel_base;
+	struct evsel *evsel_base;
 	bool first = true;
 
 	evlist__for_each_entry(evlist_base, evsel_base) {
@@ -1020,7 +1020,7 @@ static void data_process(void)
 
 		data__for_each_file_new(i, d) {
 			struct perf_evlist *evlist = d->session->evlist;
-			struct perf_evsel *evsel;
+			struct evsel *evsel;
 			struct hists *hists;
 
 			evsel = evsel_match(evsel_base, evlist);
tools/perf/builtin-evlist.c +1 -1
index 6e4f63b0da4a..e4cb61dc6315 100644
@@ -21,7 +21,7 @@
 static int __cmd_evlist(const char *file_name, struct perf_attr_details *details)
 {
 	struct perf_session *session;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_data data = {
 		.path      = file_name,
 		.mode      = PERF_DATA_MODE_READ,
tools/perf/builtin-inject.c +15 -15
index f4591a1438b4..646a1bf790fc 100644
@@ -215,13 +215,13 @@ static int perf_event__drop_aux(struct perf_tool *tool,
 typedef int (*inject_handler)(struct perf_tool *tool,
 			      union perf_event *event,
 			      struct perf_sample *sample,
-			      struct perf_evsel *evsel,
+			      struct evsel *evsel,
 			      struct machine *machine);
 
 static int perf_event__repipe_sample(struct perf_tool *tool,
 				     union perf_event *event,
 				     struct perf_sample *sample,
-				     struct perf_evsel *evsel,
+				     struct evsel *evsel,
 				     struct machine *machine)
 {
 	if (evsel && evsel->handler) {
@@ -424,7 +424,7 @@ static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool,
 static int perf_event__inject_buildid(struct perf_tool *tool,
 				      union perf_event *event,
 				      struct perf_sample *sample,
-				      struct perf_evsel *evsel __maybe_unused,
+				      struct evsel *evsel __maybe_unused,
 				      struct machine *machine)
 {
 	struct addr_location al;
@@ -465,7 +465,7 @@ repipe:
 static int perf_inject__sched_process_exit(struct perf_tool *tool,
 					   union perf_event *event __maybe_unused,
 					   struct perf_sample *sample,
-					   struct perf_evsel *evsel __maybe_unused,
+					   struct evsel *evsel __maybe_unused,
 					   struct machine *machine __maybe_unused)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
@@ -485,7 +485,7 @@ static int perf_inject__sched_process_exit(struct perf_tool *tool,
 static int perf_inject__sched_switch(struct perf_tool *tool,
 				     union perf_event *event,
 				     struct perf_sample *sample,
-				     struct perf_evsel *evsel,
+				     struct evsel *evsel,
 				     struct machine *machine)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
@@ -509,7 +509,7 @@ static int perf_inject__sched_switch(struct perf_tool *tool,
 static int perf_inject__sched_stat(struct perf_tool *tool,
 				   union perf_event *event __maybe_unused,
 				   struct perf_sample *sample,
-				   struct perf_evsel *evsel,
+				   struct evsel *evsel,
 				   struct machine *machine)
 {
 	struct event_entry *ent;
@@ -541,7 +541,7 @@ static void sig_handler(int sig __maybe_unused)
 	session_done = 1;
 }
 
-static int perf_evsel__check_stype(struct perf_evsel *evsel,
+static int perf_evsel__check_stype(struct evsel *evsel,
 				   u64 sample_type, const char *sample_msg)
 {
 	struct perf_event_attr *attr = &evsel->attr;
@@ -559,7 +559,7 @@ static int perf_evsel__check_stype(struct perf_evsel *evsel,
 static int drop_sample(struct perf_tool *tool __maybe_unused,
 		       union perf_event *event __maybe_unused,
 		       struct perf_sample *sample __maybe_unused,
-		       struct perf_evsel *evsel __maybe_unused,
+		       struct evsel *evsel __maybe_unused,
 		       struct machine *machine __maybe_unused)
 {
 	return 0;
@@ -568,7 +568,7 @@ static int drop_sample(struct perf_tool *tool __maybe_unused,
 static void strip_init(struct perf_inject *inject)
 {
 	struct perf_evlist *evlist = inject->session->evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 
 	inject->tool.context_switch = perf_event__drop;
 
@@ -576,7 +576,7 @@ static void strip_init(struct perf_inject *inject)
 		evsel->handler = drop_sample;
 }
 
-static bool has_tracking(struct perf_evsel *evsel)
+static bool has_tracking(struct evsel *evsel)
 {
 	return evsel->attr.mmap || evsel->attr.mmap2 || evsel->attr.comm ||
 	       evsel->attr.task;
@@ -591,9 +591,9 @@ static bool has_tracking(struct perf_evsel *evsel)
  * and it has a compatible sample type.
  */
 static bool ok_to_remove(struct perf_evlist *evlist,
-			 struct perf_evsel *evsel_to_remove)
+			 struct evsel *evsel_to_remove)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int cnt = 0;
 	bool ok = false;
 
@@ -615,7 +615,7 @@ static bool ok_to_remove(struct perf_evlist *evlist,
 static void strip_fini(struct perf_inject *inject)
 {
 	struct perf_evlist *evlist = inject->session->evlist;
-	struct perf_evsel *evsel, *tmp;
+	struct evsel *evsel, *tmp;
 
 	/* Remove non-synthesized evsels if possible */
 	evlist__for_each_entry_safe(evlist, tmp, evsel) {
@@ -651,7 +651,7 @@ static int __cmd_inject(struct perf_inject *inject)
 	if (inject->build_ids) {
 		inject->tool.sample = perf_event__inject_buildid;
 	} else if (inject->sched_stat) {
-		struct perf_evsel *evsel;
+		struct evsel *evsel;
 
 		evlist__for_each_entry(session->evlist, evsel) {
 			const char *name = perf_evsel__name(evsel);
@@ -712,7 +712,7 @@ static int __cmd_inject(struct perf_inject *inject)
 		 * remove the evsel.
 		 */
 		if (inject->itrace_synth_opts.set) {
-			struct perf_evsel *evsel;
+			struct evsel *evsel;
 
 			perf_header__clear_feat(&session->header,
 						HEADER_AUXTRACE);
tools/perf/builtin-kmem.c +12 -12
index 9e5e60898083..46f828936120 100644
@@ -166,7 +166,7 @@ static int insert_caller_stat(unsigned long call_site,
 	return 0;
 }
 
-static int perf_evsel__process_alloc_event(struct perf_evsel *evsel,
+static int perf_evsel__process_alloc_event(struct evsel *evsel,
 					   struct perf_sample *sample)
 {
 	unsigned long ptr = perf_evsel__intval(evsel, sample, "ptr"),
@@ -185,7 +185,7 @@ static int perf_evsel__process_alloc_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_alloc_node_event(struct perf_evsel *evsel,
+static int perf_evsel__process_alloc_node_event(struct evsel *evsel,
 						struct perf_sample *sample)
 {
 	int ret = perf_evsel__process_alloc_event(evsel, sample);
@@ -229,7 +229,7 @@ static struct alloc_stat *search_alloc_stat(unsigned long ptr,
 	return NULL;
 }
 
-static int perf_evsel__process_free_event(struct perf_evsel *evsel,
+static int perf_evsel__process_free_event(struct evsel *evsel,
 					  struct perf_sample *sample)
 {
 	unsigned long ptr = perf_evsel__intval(evsel, sample, "ptr");
@@ -381,7 +381,7 @@ static int build_alloc_func_list(void)
  * Find first non-memory allocation function from callchain.
  * The allocation functions are in the 'alloc_func_list'.
  */
-static u64 find_callsite(struct perf_evsel *evsel, struct perf_sample *sample)
+static u64 find_callsite(struct evsel *evsel, struct perf_sample *sample)
 {
 	struct addr_location al;
 	struct machine *machine = &kmem_session->machines.host;
@@ -728,7 +728,7 @@ static char *compact_gfp_string(unsigned long gfp_flags)
 	return NULL;
 }
 
-static int parse_gfp_flags(struct perf_evsel *evsel, struct perf_sample *sample,
+static int parse_gfp_flags(struct evsel *evsel, struct perf_sample *sample,
 			   unsigned int gfp_flags)
 {
 	struct tep_record record = {
@@ -779,7 +779,7 @@ static int parse_gfp_flags(struct perf_evsel *evsel, struct perf_sample *sample,
 	return 0;
 }
 
-static int perf_evsel__process_page_alloc_event(struct perf_evsel *evsel,
+static int perf_evsel__process_page_alloc_event(struct evsel *evsel,
 						struct perf_sample *sample)
 {
 	u64 page;
@@ -852,7 +852,7 @@ static int perf_evsel__process_page_alloc_event(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_page_free_event(struct perf_evsel *evsel,
+static int perf_evsel__process_page_free_event(struct evsel *evsel,
 						struct perf_sample *sample)
 {
 	u64 page;
@@ -930,13 +930,13 @@ static bool perf_kmem__skip_sample(struct perf_sample *sample)
 	return false;
 }
 
-typedef int (*tracepoint_handler)(struct perf_evsel *evsel,
+typedef int (*tracepoint_handler)(struct evsel *evsel,
 				  struct perf_sample *sample);
 
 static int process_sample_event(struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -1363,8 +1363,8 @@ static void sort_result(void)
 static int __cmd_kmem(struct perf_session *session)
 {
 	int err = -EINVAL;
-	struct perf_evsel *evsel;
-	const struct perf_evsel_str_handler kmem_tracepoints[] = {
+	struct evsel *evsel;
+	const struct evsel_str_handler kmem_tracepoints[] = {
 		/* slab allocator */
 		{ "kmem:kmalloc",		perf_evsel__process_alloc_event, },
     		{ "kmem:kmem_cache_alloc",	perf_evsel__process_alloc_event, },
@@ -1967,7 +1967,7 @@ int cmd_kmem(int argc, const char **argv)
 	}
 
 	if (kmem_page) {
-		struct perf_evsel *evsel;
+		struct evsel *evsel;
 
 		evsel = perf_evlist__find_tracepoint_by_name(session->evlist,
 							     "kmem:mm_page_alloc");
tools/perf/builtin-kvm.c +10 -10
index b33c83489120..cf8f27d05296 100644
@@ -57,7 +57,7 @@ static const char *get_filename_for_perf_kvm(void)
 #ifdef HAVE_KVM_STAT_SUPPORT
 #include "util/kvm-stat.h"
 
-void exit_event_get_key(struct perf_evsel *evsel,
+void exit_event_get_key(struct evsel *evsel,
 			struct perf_sample *sample,
 			struct event_key *key)
 {
@@ -65,12 +65,12 @@ void exit_event_get_key(struct perf_evsel *evsel,
 	key->key = perf_evsel__intval(evsel, sample, kvm_exit_reason);
 }
 
-bool kvm_exit_event(struct perf_evsel *evsel)
+bool kvm_exit_event(struct evsel *evsel)
 {
 	return !strcmp(evsel->name, kvm_exit_trace);
 }
 
-bool exit_event_begin(struct perf_evsel *evsel,
+bool exit_event_begin(struct evsel *evsel,
 		      struct perf_sample *sample, struct event_key *key)
 {
 	if (kvm_exit_event(evsel)) {
@@ -81,12 +81,12 @@ bool exit_event_begin(struct perf_evsel *evsel,
 	return false;
 }
 
-bool kvm_entry_event(struct perf_evsel *evsel)
+bool kvm_entry_event(struct evsel *evsel)
 {
 	return !strcmp(evsel->name, kvm_entry_trace);
 }
 
-bool exit_event_end(struct perf_evsel *evsel,
+bool exit_event_end(struct evsel *evsel,
 		    struct perf_sample *sample __maybe_unused,
 		    struct event_key *key __maybe_unused)
 {
@@ -286,7 +286,7 @@ static bool update_kvm_event(struct kvm_event *event, int vcpu_id,
 }
 
 static bool is_child_event(struct perf_kvm_stat *kvm,
-			   struct perf_evsel *evsel,
+			   struct evsel *evsel,
 			   struct perf_sample *sample,
 			   struct event_key *key)
 {
@@ -396,7 +396,7 @@ static bool handle_end_event(struct perf_kvm_stat *kvm,
 
 static
 struct vcpu_event_record *per_vcpu_record(struct thread *thread,
-					  struct perf_evsel *evsel,
+					  struct evsel *evsel,
 					  struct perf_sample *sample)
 {
 	/* Only kvm_entry records vcpu id. */
@@ -419,7 +419,7 @@ struct vcpu_event_record *per_vcpu_record(struct thread *thread,
 
 static bool handle_kvm_event(struct perf_kvm_stat *kvm,
 			     struct thread *thread,
-			     struct perf_evsel *evsel,
+			     struct evsel *evsel,
 			     struct perf_sample *sample)
 {
 	struct vcpu_event_record *vcpu_record;
@@ -672,7 +672,7 @@ static bool skip_sample(struct perf_kvm_stat *kvm,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -1011,7 +1011,7 @@ out:
 static int kvm_live_open_events(struct perf_kvm_stat *kvm)
 {
 	int err, rc = -1;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_evlist *evlist = kvm->evlist;
 	char sbuf[STRERR_BUFSIZE];
 
tools/perf/builtin-lock.c +15 -15
index 574e30ec6d7c..38500bff4423 100644
@@ -347,16 +347,16 @@ alloc_failed:
 }
 
 struct trace_lock_handler {
-	int (*acquire_event)(struct perf_evsel *evsel,
+	int (*acquire_event)(struct evsel *evsel,
 			     struct perf_sample *sample);
 
-	int (*acquired_event)(struct perf_evsel *evsel,
+	int (*acquired_event)(struct evsel *evsel,
 			      struct perf_sample *sample);
 
-	int (*contended_event)(struct perf_evsel *evsel,
+	int (*contended_event)(struct evsel *evsel,
 			       struct perf_sample *sample);
 
-	int (*release_event)(struct perf_evsel *evsel,
+	int (*release_event)(struct evsel *evsel,
 			     struct perf_sample *sample);
 };
 
@@ -396,7 +396,7 @@ enum acquire_flags {
 	READ_LOCK = 2,
 };
 
-static int report_lock_acquire_event(struct perf_evsel *evsel,
+static int report_lock_acquire_event(struct evsel *evsel,
 				     struct perf_sample *sample)
 {
 	void *addr;
@@ -468,7 +468,7 @@ end:
 	return 0;
 }
 
-static int report_lock_acquired_event(struct perf_evsel *evsel,
+static int report_lock_acquired_event(struct evsel *evsel,
 				      struct perf_sample *sample)
 {
 	void *addr;
@@ -531,7 +531,7 @@ end:
 	return 0;
 }
 
-static int report_lock_contended_event(struct perf_evsel *evsel,
+static int report_lock_contended_event(struct evsel *evsel,
 				       struct perf_sample *sample)
 {
 	void *addr;
@@ -586,7 +586,7 @@ end:
 	return 0;
 }
 
-static int report_lock_release_event(struct perf_evsel *evsel,
+static int report_lock_release_event(struct evsel *evsel,
 				     struct perf_sample *sample)
 {
 	void *addr;
@@ -656,7 +656,7 @@ static struct trace_lock_handler report_lock_ops  = {
 
 static struct trace_lock_handler *trace_handler;
 
-static int perf_evsel__process_lock_acquire(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_acquire(struct evsel *evsel,
 					     struct perf_sample *sample)
 {
 	if (trace_handler->acquire_event)
@@ -664,7 +664,7 @@ static int perf_evsel__process_lock_acquire(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_lock_acquired(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_acquired(struct evsel *evsel,
 					      struct perf_sample *sample)
 {
 	if (trace_handler->acquired_event)
@@ -672,7 +672,7 @@ static int perf_evsel__process_lock_acquired(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_lock_contended(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_contended(struct evsel *evsel,
 					      struct perf_sample *sample)
 {
 	if (trace_handler->contended_event)
@@ -680,7 +680,7 @@ static int perf_evsel__process_lock_contended(struct perf_evsel *evsel,
 	return 0;
 }
 
-static int perf_evsel__process_lock_release(struct perf_evsel *evsel,
+static int perf_evsel__process_lock_release(struct evsel *evsel,
 					    struct perf_sample *sample)
 {
 	if (trace_handler->release_event)
@@ -806,13 +806,13 @@ static int dump_info(void)
 	return rc;
 }
 
-typedef int (*tracepoint_handler)(struct perf_evsel *evsel,
+typedef int (*tracepoint_handler)(struct evsel *evsel,
 				  struct perf_sample *sample);
 
 static int process_sample_event(struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -847,7 +847,7 @@ static void sort_result(void)
 	}
 }
 
-static const struct perf_evsel_str_handler lock_tracepoints[] = {
+static const struct evsel_str_handler lock_tracepoints[] = {
 	{ "lock:lock_acquire",	 perf_evsel__process_lock_acquire,   }, /* CONFIG_LOCKDEP */
 	{ "lock:lock_acquired",	 perf_evsel__process_lock_acquired,  }, /* CONFIG_LOCKDEP, CONFIG_LOCK_STAT */
 	{ "lock:lock_contended", perf_evsel__process_lock_contended, }, /* CONFIG_LOCKDEP, CONFIG_LOCK_STAT */
tools/perf/builtin-mem.c +1 -1
index f45c8b502f63..9e60eda9297d 100644
@@ -230,7 +230,7 @@ out_put:
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel __maybe_unused,
+				struct evsel *evsel __maybe_unused,
 				struct machine *machine)
 {
 	return dump_raw_samples(tool, event, sample, machine);
tools/perf/builtin-record.c +2 -2
index bcfc16450608..7ba3a2c32e54 100644
@@ -713,7 +713,7 @@ static int record__mmap(struct record *rec)
 static int record__open(struct record *rec)
 {
 	char msg[BUFSIZ];
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_evlist *evlist = rec->evlist;
 	struct perf_session *session = rec->session;
 	struct record_opts *opts = &rec->opts;
@@ -782,7 +782,7 @@ out:
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct record *rec = container_of(tool, struct record, tool);
tools/perf/builtin-report.c +11 -11
index abf0b9b8f566..96a506f0d4c1 100644
@@ -128,7 +128,7 @@ static int hist_iter__report_callback(struct hist_entry_iter *iter,
 	int err = 0;
 	struct report *rep = arg;
 	struct hist_entry *he = iter->he;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 	struct perf_sample *sample = iter->sample;
 	struct mem_info *mi;
 	struct branch_info *bi;
@@ -172,7 +172,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
 	struct report *rep = arg;
 	struct branch_info *bi;
 	struct perf_sample *sample = iter->sample;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 	int err;
 
 	if (!ui__has_annotation() && !rep->symbol_ipc)
@@ -225,7 +225,7 @@ static int process_feature_event(struct perf_session *session,
 static int process_sample_event(struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct perf_evsel *evsel,
+				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct report *rep = container_of(tool, struct report, tool);
@@ -292,7 +292,7 @@ out_put:
 static int process_read_event(struct perf_tool *tool,
 			      union perf_event *event,
 			      struct perf_sample *sample __maybe_unused,
-			      struct perf_evsel *evsel,
+			      struct evsel *evsel,
 			      struct machine *machine __maybe_unused)
 {
 	struct report *rep = container_of(tool, struct report, tool);
@@ -400,7 +400,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	char unit;
 	unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
 	u64 nr_events = hists->stats.total_period;
-	struct perf_evsel *evsel = hists_to_evsel(hists);
+	struct evsel *evsel = hists_to_evsel(hists);
 	char buf[512];
 	size_t size = sizeof(buf);
 	int socked_id = hists->socket_filter;
@@ -414,7 +414,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	}
 
 	if (perf_evsel__is_group_event(evsel)) {
-		struct perf_evsel *pos;
+		struct evsel *pos;
 
 		perf_evsel__group_desc(evsel, buf, size);
 		evname = buf;
@@ -463,7 +463,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 					 struct report *rep,
 					 const char *help)
 {
-	struct perf_evsel *pos;
+	struct evsel *pos;
 
 	if (!quiet) {
 		fprintf(stdout, "#\n# Total Lost Samples: %" PRIu64 "\n#\n",
@@ -586,7 +586,7 @@ static int report__browse_hists(struct report *rep)
 static int report__collapse_hists(struct report *rep)
 {
 	struct ui_progress prog;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	int ret = 0;
 
 	ui_progress__init(&prog, rep->nr_entries, "Merging related events...");
@@ -623,7 +623,7 @@ static int hists__resort_cb(struct hist_entry *he, void *arg)
 	struct symbol *sym = he->ms.sym;
 
 	if (rep->symbol_ipc && sym && !sym->annotate2) {
-		struct perf_evsel *evsel = hists_to_evsel(he->hists);
+		struct evsel *evsel = hists_to_evsel(he->hists);
 
 		symbol__annotate2(sym, he->ms.map, evsel,
 				  &annotation__default_options, NULL);
@@ -635,7 +635,7 @@ static int hists__resort_cb(struct hist_entry *he, void *arg)
 static void report__output_resort(struct report *rep)
 {
 	struct ui_progress prog;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 
 	ui_progress__init(&prog, rep->nr_entries, "Sorting events for output...");
 
@@ -818,7 +818,7 @@ static int __cmd_report(struct report *rep)
 {
 	int ret;
 	struct perf_session *session = rep->session;
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_data *data = session->data;
 
 	signal(SIGINT, sig_handler);
tools/perf/builtin-sched.c +37 -37

286 lines not on this page · raw message

tools/perf/builtin-script.c +45 -45

332 lines not on this page · raw message

tools/perf/builtin-stat.c +9 -9
index 2b9518a38baf..e0ba97018ad7 100644
@@ -234,7 +234,7 @@ static int write_stat_round_event(u64 tm, u64 type)
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
 static int
-perf_evsel__write_stat_event(struct perf_evsel *counter, u32 cpu, u32 thread,
+perf_evsel__write_stat_event(struct evsel *counter, u32 cpu, u32 thread,
 			     struct perf_counts_values *count)
 {
 	struct perf_sample_id *sid = SID(counter, cpu, thread);
@@ -243,7 +243,7 @@ perf_evsel__write_stat_event(struct perf_evsel *counter, u32 cpu, u32 thread,
 					   process_synthesized_event, NULL);
 }
 
-static int read_single_counter(struct perf_evsel *counter, int cpu,
+static int read_single_counter(struct evsel *counter, int cpu,
 			       int thread, struct timespec *rs)
 {
 	if (counter->tool_event == PERF_TOOL_DURATION_TIME) {
@@ -261,7 +261,7 @@ static int read_single_counter(struct perf_evsel *counter, int cpu,
  * Read out the results of a single counter:
  * do not aggregate counts across CPUs in system-wide mode
  */
-static int read_counter(struct perf_evsel *counter, struct timespec *rs)
+static int read_counter(struct evsel *counter, struct timespec *rs)
 {
 	int nthreads = thread_map__nr(evsel_list->threads);
 	int ncpus, cpu, thread;
@@ -319,7 +319,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
 
 static void read_counters(struct timespec *rs)
 {
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	int ret;
 
 	evlist__for_each_entry(evsel_list, counter) {
@@ -389,7 +389,7 @@ static void workload_exec_failed_signal(int signo __maybe_unused, siginfo_t *inf
 	workload_exec_errno = info->si_value.sival_int;
 }
 
-static bool perf_evsel__should_store_id(struct perf_evsel *counter)
+static bool perf_evsel__should_store_id(struct evsel *counter)
 {
 	return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID;
 }
@@ -423,7 +423,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 	int timeout = stat_config.timeout;
 	char msg[BUFSIZ];
 	unsigned long long t0, t1;
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	struct timespec ts;
 	size_t l;
 	int status = 0;
@@ -868,7 +868,7 @@ static int perf_stat__get_core_cached(struct perf_stat_config *config,
 
 static bool term_percore_set(void)
 {
-	struct perf_evsel *counter;
+	struct evsel *counter;
 
 	evlist__for_each_entry(evsel_list, counter) {
 		if (counter->percore)
@@ -1462,7 +1462,7 @@ static int process_stat_round_event(struct perf_session *session,
 				    union perf_event *event)
 {
 	struct stat_round_event *stat_round = &event->stat_round;
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	struct timespec tsh, *ts = NULL;
 	const char **argv = session->header.env.cmdline_argv;
 	int argc = session->header.env.nr_cmdline;
@@ -1676,7 +1676,7 @@ static void setup_system_wide(int forks)
 	if (!forks)
 		target.system_wide = true;
 	else {
-		struct perf_evsel *counter;
+		struct evsel *counter;
 
 		evlist__for_each_entry(evsel_list, counter) {
 			if (!counter->system_wide)
tools/perf/builtin-timechart.c +22 -22

176 lines not on this page · raw message

tools/perf/builtin-top.c +15 -15
index b46b3c9f57a0..2f22f313985e 100644
@@ -101,7 +101,7 @@ static void perf_top__resize(struct perf_top *top)
 
 static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct symbol *sym;
 	struct annotation *notes;
 	struct map *map;
@@ -186,7 +186,7 @@ static void ui__warn_map_erange(struct map *map, struct symbol *sym, u64 ip)
 static void perf_top__record_precise_ip(struct perf_top *top,
 					struct hist_entry *he,
 					struct perf_sample *sample,
-					struct perf_evsel *evsel, u64 ip)
+					struct evsel *evsel, u64 ip)
 {
 	struct annotation *notes;
 	struct symbol *sym = he->ms.sym;
@@ -228,7 +228,7 @@ static void perf_top__record_precise_ip(struct perf_top *top,
 static void perf_top__show_details(struct perf_top *top)
 {
 	struct hist_entry *he = top->sym_filter_entry;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct annotation *notes;
 	struct symbol *symbol;
 	int more;
@@ -270,7 +270,7 @@ static void perf_top__print_sym_table(struct perf_top *top)
 	char bf[160];
 	int printed = 0;
 	const int win_width = top->winsize.ws_col - 1;
-	struct perf_evsel *evsel = top->sym_evsel;
+	struct evsel *evsel = top->sym_evsel;
 	struct hists *hists = evsel__hists(evsel);
 
 	puts(CONSOLE_CLEAR);
@@ -554,7 +554,7 @@ static bool perf_top__handle_keypress(struct perf_top *top, int c)
 static void perf_top__sort_new_samples(void *arg)
 {
 	struct perf_top *t = arg;
-	struct perf_evsel *evsel = t->sym_evsel;
+	struct evsel *evsel = t->sym_evsel;
 	struct hists *hists;
 
 	if (t->evlist->selected != NULL)
@@ -586,7 +586,7 @@ static void stop_top(void)
 
 static void *display_thread_tui(void *arg)
 {
-	struct perf_evsel *pos;
+	struct evsel *pos;
 	struct perf_top *top = arg;
 	const char *help = "For a higher level overview, try: perf top --sort comm,dso";
 	struct hist_browser_timer hbt = {
@@ -693,7 +693,7 @@ static int hist_iter__top_callback(struct hist_entry_iter *iter,
 {
 	struct perf_top *top = arg;
 	struct hist_entry *he = iter->he;
-	struct perf_evsel *evsel = iter->evsel;
+	struct evsel *evsel = iter->evsel;
 
 	if (perf_hpp_list.sym && single)
 		perf_top__record_precise_ip(top, he, iter->sample, evsel, al->addr);
@@ -705,7 +705,7 @@ static int hist_iter__top_callback(struct hist_entry_iter *iter,
 
 static void perf_event__process_sample(struct perf_tool *tool,
 				       const union perf_event *event,
-				       struct perf_evsel *evsel,
+				       struct evsel *evsel,
 				       struct perf_sample *sample,
 				       struct machine *machine)
 {
@@ -813,7 +813,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
 
 static void
 perf_top__process_lost(struct perf_top *top, union perf_event *event,
-		       struct perf_evsel *evsel)
+		       struct evsel *evsel)
 {
 	struct hists *hists = evsel__hists(evsel);
 
@@ -825,7 +825,7 @@ perf_top__process_lost(struct perf_top *top, union perf_event *event,
 static void
 perf_top__process_lost_samples(struct perf_top *top,
 			       union perf_event *event,
-			       struct perf_evsel *evsel)
+			       struct evsel *evsel)
 {
 	struct hists *hists = evsel__hists(evsel);
 
@@ -912,7 +912,7 @@ static int perf_top__overwrite_check(struct perf_top *top)
 	struct perf_evlist *evlist = top->evlist;
 	struct perf_evsel_config_term *term;
 	struct list_head *config_terms;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int set, overwrite = -1;
 
 	evlist__for_each_entry(evlist, evsel) {
@@ -952,11 +952,11 @@ static int perf_top__overwrite_check(struct perf_top *top)
 }
 
 static int perf_top_overwrite_fallback(struct perf_top *top,
-				       struct perf_evsel *evsel)
+				       struct evsel *evsel)
 {
 	struct record_opts *opts = &top->record_opts;
 	struct perf_evlist *evlist = top->evlist;
-	struct perf_evsel *counter;
+	struct evsel *counter;
 
 	if (!opts->overwrite)
 		return 0;
@@ -975,7 +975,7 @@ static int perf_top_overwrite_fallback(struct perf_top *top,
 static int perf_top__start_counters(struct perf_top *top)
 {
 	char msg[BUFSIZ];
-	struct perf_evsel *counter;
+	struct evsel *counter;
 	struct perf_evlist *evlist = top->evlist;
 	struct record_opts *opts = &top->record_opts;
 
@@ -1104,7 +1104,7 @@ static int deliver_event(struct ordered_events *qe,
 	struct perf_session *session = top->session;
 	union perf_event *event = qevent->event;
 	struct perf_sample sample;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct machine *machine;
 	int ret = -1;
 
tools/perf/builtin-trace.c +38 -38

291 lines not on this page · raw message

tools/perf/tests/backward-ring-buffer.c +1 -1
index 1a9c3becf5ff..921af318507c 100644
@@ -83,7 +83,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
 	int ret = TEST_SKIP, err, sample_count = 0, comm_count = 0;
 	char pid[16], sbuf[STRERR_BUFSIZE];
 	struct perf_evlist *evlist;
-	struct perf_evsel *evsel __maybe_unused;
+	struct evsel *evsel __maybe_unused;
 	struct parse_events_error parse_error;
 	struct record_opts opts = {
 		.target = {
tools/perf/tests/code-reading.c +1 -1
index 88c218eacc43..062d23bba2df 100644
@@ -555,7 +555,7 @@ static int do_test_code_reading(bool try_kcore)
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	int err = -1, ret;
 	pid_t pid;
 	struct map *map;
tools/perf/tests/event-times.c +7 -7
index 684ad56f7b0f..45fe674233d7 100644
@@ -14,7 +14,7 @@
 
 static int attach__enable_on_exec(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct target target = {
 		.uid = UINT_MAX,
 	};
@@ -56,7 +56,7 @@ static int detach__enable_on_exec(struct perf_evlist *evlist)
 
 static int attach__current_disabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
 	int err;
 
@@ -82,7 +82,7 @@ static int attach__current_disabled(struct perf_evlist *evlist)
 
 static int attach__current_enabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
 	int err;
 
@@ -102,14 +102,14 @@ static int attach__current_enabled(struct perf_evlist *evlist)
 
 static int detach__disable(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 
 	return perf_evsel__enable(evsel);
 }
 
 static int attach__cpu_disabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
 	int err;
 
@@ -138,7 +138,7 @@ static int attach__cpu_disabled(struct perf_evlist *evlist)
 
 static int attach__cpu_enabled(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evlist__last(evlist);
+	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
 	int err;
 
@@ -163,7 +163,7 @@ static int test_times(int (attach)(struct perf_evlist *),
 {
 	struct perf_counts_values count;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int err = -1, i;
 
 	evlist = perf_evlist__new();
tools/perf/tests/event_update.c +1 -1
index b5042f019ec4..0e5a2e8195e4 100644
@@ -80,7 +80,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	struct perf_evlist *evlist;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct event_name tmp;
 
 	evlist = perf_evlist__new_default();
tools/perf/tests/evsel-roundtrip-name.c +2 -2
index a104728ebf25..bb38489eda1e 100644
@@ -11,7 +11,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 {
 	char name[128];
 	int type, op, err = 0, ret = 0, i, idx;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
@@ -67,7 +67,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 static int __perf_evsel__name_array_test(const char *names[], int nr_names)
 {
 	int i, err;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
tools/perf/tests/evsel-tp-sched.c +2 -2
index 71f60c0f9faa..0170e9d2e329 100644
@@ -5,7 +5,7 @@
 #include "tests.h"
 #include "debug.h"
 
-static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
+static int perf_evsel__test_field(struct evsel *evsel, const char *name,
 				  int size, bool should_be_signed)
 {
 	struct tep_format_field *field = perf_evsel__field(evsel, name);
@@ -35,7 +35,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
 
 int test__perf_evsel__tp_sched_test(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct perf_evsel *evsel = perf_evsel__newtp("sched", "sched_switch");
+	struct evsel *evsel = perf_evsel__newtp("sched", "sched_switch");
 	int ret = 0;
 
 	if (IS_ERR(evsel)) {
tools/perf/tests/hists_cumulate.c +7 -7
index 7a2eed6c783e..b62bf7c3bea2 100644
@@ -80,7 +80,7 @@ static u64 fake_callchains[][10] = {
 static int add_hist_entries(struct hists *hists, struct machine *machine)
 {
 	struct addr_location al;
-	struct perf_evsel *evsel = hists_to_evsel(hists);
+	struct evsel *evsel = hists_to_evsel(hists);
 	struct perf_sample sample = { .period = 1000, };
 	size_t i;
 
@@ -147,7 +147,7 @@ static void del_hist_entries(struct hists *hists)
 	}
 }
 
-typedef int (*test_fn_t)(struct perf_evsel *, struct machine *);
+typedef int (*test_fn_t)(struct evsel *, struct machine *);
 
 #define COMM(he)  (thread__comm_str(he->thread))
 #define DSO(he)   (he->ms.map->dso->short_name)
@@ -247,7 +247,7 @@ static int do_test(struct hists *hists, struct result *expected, size_t nr_expec
 }
 
 /* NO callchain + NO children */
-static int test1(struct perf_evsel *evsel, struct machine *machine)
+static int test1(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -298,7 +298,7 @@ out:
 }
 
 /* callcain + NO children */
-static int test2(struct perf_evsel *evsel, struct machine *machine)
+static int test2(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -446,7 +446,7 @@ out:
 }
 
 /* NO callchain + children */
-static int test3(struct perf_evsel *evsel, struct machine *machine)
+static int test3(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -503,7 +503,7 @@ out:
 }
 
 /* callchain + children */
-static int test4(struct perf_evsel *evsel, struct machine *machine)
+static int test4(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -694,7 +694,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
 	int err = TEST_FAIL;
 	struct machines machines;
 	struct machine *machine;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
tools/perf/tests/hists_filter.c +2 -2
index 975844807fe2..3e679bb8da7f 100644
@@ -50,7 +50,7 @@ static struct sample fake_samples[] = {
 static int add_hist_entries(struct perf_evlist *evlist,
 			    struct machine *machine)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct addr_location al;
 	struct perf_sample sample = { .period = 100, };
 	size_t i;
@@ -108,7 +108,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
 	int err = TEST_FAIL;
 	struct machines machines;
 	struct machine *machine;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 
 	TEST_ASSERT_VAL("No memory", evlist);
tools/perf/tests/hists_link.c +2 -2
index af633db63f4d..078ee9876980 100644
@@ -64,7 +64,7 @@ static struct sample fake_samples[][5] = {
 
 static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
 {
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct addr_location al;
 	struct hist_entry *he;
 	struct perf_sample sample = { .period = 1, .weight = 1, };
@@ -271,7 +271,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
 	struct hists *hists, *first_hists;
 	struct machines machines;
 	struct machine *machine = NULL;
-	struct perf_evsel *evsel, *first;
+	struct evsel *evsel, *first;
 	struct perf_evlist *evlist = perf_evlist__new();
 
 	if (evlist == NULL)
tools/perf/tests/hists_output.c +8 -8
index 0a510c524a5d..5cd4b1baa9d1 100644
@@ -50,7 +50,7 @@ static struct sample fake_samples[] = {
 static int add_hist_entries(struct hists *hists, struct machine *machine)
 {
 	struct addr_location al;
-	struct perf_evsel *evsel = hists_to_evsel(hists);
+	struct evsel *evsel = hists_to_evsel(hists);
 	struct perf_sample sample = { .period = 100, };
 	size_t i;
 
@@ -113,7 +113,7 @@ static void del_hist_entries(struct hists *hists)
 	}
 }
 
-typedef int (*test_fn_t)(struct perf_evsel *, struct machine *);
+typedef int (*test_fn_t)(struct evsel *, struct machine *);
 
 #define COMM(he)  (thread__comm_str(he->thread))
 #define DSO(he)   (he->ms.map->dso->short_name)
@@ -122,7 +122,7 @@ typedef int (*test_fn_t)(struct perf_evsel *, struct machine *);
 #define PID(he)   (he->thread->tid)
 
 /* default sort keys (no field) */
-static int test1(struct perf_evsel *evsel, struct machine *machine)
+static int test1(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -224,7 +224,7 @@ out:
 }
 
 /* mixed fields and sort keys */
-static int test2(struct perf_evsel *evsel, struct machine *machine)
+static int test2(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -280,7 +280,7 @@ out:
 }
 
 /* fields only (no sort key) */
-static int test3(struct perf_evsel *evsel, struct machine *machine)
+static int test3(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -354,7 +354,7 @@ out:
 }
 
 /* handle duplicate 'dso' field */
-static int test4(struct perf_evsel *evsel, struct machine *machine)
+static int test4(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -456,7 +456,7 @@ out:
 }
 
 /* full sort keys w/o overhead field */
-static int test5(struct perf_evsel *evsel, struct machine *machine)
+static int test5(struct evsel *evsel, struct machine *machine)
 {
 	int err;
 	struct hists *hists = evsel__hists(evsel);
@@ -580,7 +580,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
 	int err = TEST_FAIL;
 	struct machines machines;
 	struct machine *machine;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	struct perf_evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
tools/perf/tests/keep-tracking.c +1 -1
index e1e5e32cbb53..8ada3e63f1ba 100644
@@ -68,7 +68,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
 	struct perf_evlist *evlist = NULL;
-	struct perf_evsel *evsel = NULL;
+	struct evsel *evsel = NULL;
 	int found, err = -1;
 	const char *comm;
 
tools/perf/tests/mmap-basic.c +1 -1
index c1e2fe087b67..76ee42eb1355 100644
@@ -36,7 +36,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 #define nsyscalls ARRAY_SIZE(syscall_names)
 	unsigned int nr_events[nsyscalls],
 		     expected_nr_events[nsyscalls], i, j;
-	struct perf_evsel *evsels[nsyscalls], *evsel;
+	struct evsel *evsels[nsyscalls], *evsel;
 	char sbuf[STRERR_BUFSIZE];
 	struct perf_mmap *md;
 
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
index 9cd5bf63bec1..4bf73896695a 100644
@@ -21,7 +21,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
 {
 	int err = -1, fd, cpu;
 	struct perf_cpu_map *cpus;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
 	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
tools/perf/tests/openat-syscall-tp-fields.c +1 -1
index 344dc3ac2469..2e467448e220 100644
@@ -33,7 +33,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
 	const char *filename = "/etc/passwd";
 	int flags = O_RDONLY | O_DIRECTORY;
 	struct perf_evlist *evlist = perf_evlist__new();
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	int err = -1, i, nr_events = 0, nr_polls = 0;
 	char sbuf[STRERR_BUFSIZE];
 
tools/perf/tests/openat-syscall.c +1 -1
index 652b8328ca93..f3efadd05863 100644
@@ -14,7 +14,7 @@
 int test__openat_syscall_event(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
 	int err = -1, fd;
-	struct perf_evsel *evsel;
+	struct evsel *evsel;
 	unsigned int nr_openat_calls = 111, i;
 	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
tools/perf/tests/parse-events.c +60 -60

429 lines not on this page · raw message

tools/perf/tests/perf-record.c +1 -1
index 07f6bd8ed719..7e576c2db941 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/sample-parsing.c +1 -1
index 361714e2583c..a8cd3ed3c116 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/sw-clock.c +1 -1
index d57b8d9c1575..620a99aad1e3 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/switch-tracking.c +5 -5
index 3652c548cc22..a946b9fa60dd 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/task-exit.c +1 -1
index 9602ff91a3c7..e6fb4b8d8bc2 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/annotate.c +7 -7
index e67880bf1efe..64cc650c4543 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/hists.c +20 -20
index a94eb0755e8b..9bc818621eb6 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/res_sample.c +1 -1
index 8aa3547bb9ff..7f3576deafd7 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/browsers/scripts.c +2 -2
index 4d565cc14076..c0462457e9f9 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/gtk/annotate.c +3 -3
index 3af87c18a914..40e263a730e4 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/gtk/gtk.h +2 -2
index 9846ea5c831b..e2f5fbef3c9a 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/gtk/hists.c +1 -1
index 3955ed1d1bd9..d5c9fe230632 100644

Lines of this file are not shown. View the raw message.

tools/perf/ui/hist.c +4 -4
index 412d6f1626e3..214af526901b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/annotate.c +16 -16
index ac9ad2330f93..6ea5d678a81c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/annotate.h +13 -13
index 5bc0cf655d37..7c42f320efa2 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/auxtrace.c +4 -4
index ec0af36697c4..98b151bc9a36 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/bpf-loader.c +6 -6
index 6d0dfb777a79..594ea279e25b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/bpf-loader.h +3 -3
index 8c3441a4b72c..e2048c978a24 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/build-id.c +1 -1
index f1abfab7aa8c..b98754863de9 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/build-id.h +1 -1
index 93668f38f1ed..aad419bb165c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/callchain.c +1 -1
index 8d7d8f62fcca..d077704f9afa 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/callchain.h +1 -1
index 80e056a3d882..45b9ed49e2b1 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/cgroup.c +5 -5
index 484c29830a81..4f5c326a9477 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/counts.c +3 -3
index 01ee81df3fe5..f94e1a23dad6 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/counts.h +3 -3
index 460b56ce3252..0f0cb2d8f70d 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/cs-etm.c +2 -2
index 3d1c34fc4d68..5a9fcb60ec88 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/data-convert-bt.c +9 -9
index ddbcd59f2d9b..042ee5b6f9f1 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/db-export.c +3 -3
index ffbb3e7d3288..dc2d4de772e3 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/db-export.h +5 -5
index ba1f62a5fe10..9c3d38f5a40d 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/evlist.c +71 -71

142 lines not on this page · raw message

tools/perf/util/evlist.h +23 -23

46 lines not on this page · raw message

tools/perf/util/evsel.c +84 -84

168 lines not on this page · raw message

tools/perf/util/evsel.h +73 -73

146 lines not on this page · raw message

tools/perf/util/evsel_fprintf.c +2 -2
index 95ea147f9e18..1fddb7da4b51 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/header.c +29 -29

58 lines not on this page · raw message

tools/perf/util/header.h +4 -4
index 5b3abe4172e2..437d8617de27 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.c +13 -13
index f24fd1954f6c..3da49c479880 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.h +14 -14
index 24635f36148d..9bf247c638b8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-bts.c +1 -1
index 5560e95afdda..8fd46d5f4b39 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-pt.c +18 -18
index df061599fef4..f1595b86d7c7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/jitdump.c +2 -2
index 18c34f0c1966..8df60703411a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/kvm-stat.h +9 -9
index 1403dec189b4..299edd32d3d4 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/machine.c +3 -3
index a2359a33c748..ec0675b0caa8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/machine.h +2 -2
index 7f64016758e0..ef803f08ae12 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/map.h +1 -1
index dc93787c74f0..c3614195ddc7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/metricgroup.c +11 -11
index 416a9015405e..14c423974d63 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/metricgroup.h +3 -3
index 5c52097a5c63..500e828533f8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/parse-events.c +24 -24

48 lines not on this page · raw message

tools/perf/util/parse-events.h +1 -1
index f7139e1a2fd3..99e206598b60 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/python.c +7 -7
index 62dda70227e5..beafbd469b0c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/record.c +8 -8
index 051c67f82548..ef8f686729fd 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/s390-cpumsf.c +1 -1
index 83d2e149ef19..59d78a9fe703 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/s390-sample-raw.c +1 -1
index 6650f599ed9c..159a08220947 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/scripting-engines/trace-event-perl.c +4 -4
index 61aa7f3df915..98dcdb9a79a4 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/scripting-engines/trace-event-python.c +11 -11
index 0a7e662036b4..106aec31c07c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.c +15 -15
index 69d1d158a610..e9d1cf8eb274 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.h +4 -4
index 863dbad87849..2b2427c4c0b9 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sort.c +14 -14
index 5d2518e89fc4..133d3a45997f 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-display.c +30 -30

60 lines not on this page · raw message

tools/perf/util/stat-shadow.c +19 -19
index accb1bf1cfd8..8c19f3149f34 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.c +19 -19
index 62791c063f7a..7acb9a6730fe 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.h +7 -7
index fa675d09febd..b64cf0177a91 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/tool.h +2 -2
index 9096a6e3de59..5d880a6f0a34 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/top.c +1 -1
index 251bbf124fb0..9f098db76e3c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/top.h +2 -2
index 19f95eaf75c8..7e0f363c0658 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/trace-event-info.c +2 -2
index 4550015b9d5d..d7ae0627ac47 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/trace-event-scripting.c +1 -1
index ba58f69777a1..dfd2640c763a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/trace-event.h +2 -2
index c7002fe11673..258d79071d81 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

author reviewer
#9 lore raw

PATCH 5/79 perf tools: Rename struct perf_evlist to struct evlist

In reply to Jiri Olsa

Renaming struct perf_evlist to struct evlist, so we don't have a name clash when we add struct perf_evlist in libperf.

---
 tools/perf/arch/arm/util/auxtrace.c          |   2 +-
 tools/perf/arch/arm/util/cs-etm.c            |   8 +-
 tools/perf/arch/arm64/util/arm-spe.c         |   6 +-
 tools/perf/arch/powerpc/util/kvm-stat.c      |   6 +-
 tools/perf/arch/s390/util/auxtrace.c         |   6 +-
 tools/perf/arch/x86/tests/intel-cqm.c        |   2 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c |   2 +-
 tools/perf/arch/x86/util/auxtrace.c          |   4 +-
 tools/perf/arch/x86/util/intel-bts.c         |   6 +-
 tools/perf/arch/x86/util/intel-pt.c          |  14 +-
 tools/perf/builtin-c2c.c                     |   4 +-
 tools/perf/builtin-diff.c                    |   8 +-
 tools/perf/builtin-ftrace.c                  |   2 +-
 tools/perf/builtin-inject.c                  |   8 +-
 tools/perf/builtin-kvm.c                     |   8 +-
 tools/perf/builtin-record.c                  |  14 +-
 tools/perf/builtin-report.c                  |   8 +-
 tools/perf/builtin-sched.c                   |   4 +-
 tools/perf/builtin-script.c                  |  10 +-
 tools/perf/builtin-stat.c                    |   2 +-
 tools/perf/builtin-top.c                     |  14 +-
 tools/perf/builtin-trace.c                   |  16 +-
 tools/perf/tests/backward-ring-buffer.c      |   6 +-
 tools/perf/tests/bpf.c                       |   2 +-
 tools/perf/tests/code-reading.c              |   8 +-
 tools/perf/tests/event-times.c               |  20 +-
 tools/perf/tests/event_update.c              |   2 +-
 tools/perf/tests/evsel-roundtrip-name.c      |   4 +-
 tools/perf/tests/hists_cumulate.c            |   2 +-
 tools/perf/tests/hists_filter.c              |   4 +-
 tools/perf/tests/hists_link.c                |   4 +-
 tools/perf/tests/hists_output.c              |   2 +-
 tools/perf/tests/keep-tracking.c             |   4 +-
 tools/perf/tests/mmap-basic.c                |   2 +-
 tools/perf/tests/openat-syscall-tp-fields.c  |   2 +-
 tools/perf/tests/parse-events.c              | 126 ++++++------
 tools/perf/tests/parse-no-sample-id-all.c    |   4 +-
 tools/perf/tests/perf-record.c               |   2 +-
 tools/perf/tests/sw-clock.c                  |   2 +-
 tools/perf/tests/switch-tracking.c           |  10 +-
 tools/perf/tests/task-exit.c                 |   2 +-
 tools/perf/tests/time-utils-test.c           |   2 +-
 tools/perf/ui/browsers/hists.c               |   6 +-
 tools/perf/ui/gtk/gtk.h                      |   4 +-
 tools/perf/ui/gtk/hists.c                    |   2 +-
 tools/perf/ui/hist.c                         |   2 +-
 tools/perf/util/auxtrace.c                   |  10 +-
 tools/perf/util/auxtrace.h                   |  24 +--
 tools/perf/util/bpf-event.c                  |   2 +-
 tools/perf/util/bpf-event.h                  |   4 +-
 tools/perf/util/bpf-loader.c                 |  20 +-
 tools/perf/util/bpf-loader.h                 |  24 +--
 tools/perf/util/cgroup.c                     |  10 +-
 tools/perf/util/cgroup.h                     |   6 +-
 tools/perf/util/data-convert-bt.c            |   4 +-
 tools/perf/util/evlist.c                     | 194 +++++++++----------
 tools/perf/util/evlist.h                     | 160 +++++++--------
 tools/perf/util/evsel.c                      |   4 +-
 tools/perf/util/evsel.h                      |   4 +-
 tools/perf/util/header.c                     |  86 ++++----
 tools/perf/util/header.h                     |  16 +-
 tools/perf/util/hist.c                       |   2 +-
 tools/perf/util/hist.h                       |  10 +-
 tools/perf/util/intel-bts.c                  |   2 +-
 tools/perf/util/intel-pt.c                   |  10 +-
 tools/perf/util/kvm-stat.h                   |   4 +-
 tools/perf/util/metricgroup.c                |   6 +-
 tools/perf/util/mmap.c                       |   2 +-
 tools/perf/util/parse-events.c               |  10 +-
 tools/perf/util/parse-events.h               |   6 +-
 tools/perf/util/python.c                     |  16 +-
 tools/perf/util/record.c                     |   8 +-
 tools/perf/util/s390-sample-raw.c            |   2 +-
 tools/perf/util/sample-raw.c                 |   2 +-
 tools/perf/util/sample-raw.h                 |   6 +-
 tools/perf/util/session.c                    |  24 +--
 tools/perf/util/session.h                    |   4 +-
 tools/perf/util/sort.c                       |  20 +-
 tools/perf/util/sort.h                       |   6 +-
 tools/perf/util/stat-display.c               |  18 +-
 tools/perf/util/stat-shadow.c                |   4 +-
 tools/perf/util/stat.c                       |   8 +-
 tools/perf/util/stat.h                       |  14 +-
 tools/perf/util/tool.h                       |   4 +-
 tools/perf/util/top.h                        |   4 +-
 85 files changed, 569 insertions(+), 569 deletions(-)
tools/perf/arch/arm/util/auxtrace.c +1 -1
index fd17dccfcb0b..306a54185438 100644
@@ -50,7 +50,7 @@ static struct perf_pmu **find_all_arm_spe_pmus(int *nr_spes, int *err)
 }
 
 struct auxtrace_record
-*auxtrace_record__init(struct perf_evlist *evlist, int *err)
+*auxtrace_record__init(struct evlist *evlist, int *err)
 {
 	struct perf_pmu	*cs_etm_pmu;
 	struct evsel *evsel;
tools/perf/arch/arm/util/cs-etm.c +4 -4
index 49dda28023e4..48159b62f651 100644
@@ -32,7 +32,7 @@
 struct cs_etm_recording {
 	struct auxtrace_record	itr;
 	struct perf_pmu		*cs_etm_pmu;
-	struct perf_evlist	*evlist;
+	struct evlist		*evlist;
 	int			wrapped_cnt;
 	bool			*wrapped;
 	bool			snapshot_mode;
@@ -245,7 +245,7 @@ static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
 }
 
 static int cs_etm_recording_options(struct auxtrace_record *itr,
-				    struct perf_evlist *evlist,
+				    struct evlist *evlist,
 				    struct record_opts *opts)
 {
 	int ret;
@@ -434,7 +434,7 @@ static u64 cs_etm_get_config(struct auxtrace_record *itr)
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
-	struct perf_evlist *evlist = ptr->evlist;
+	struct evlist *evlist = ptr->evlist;
 	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
@@ -485,7 +485,7 @@ static u64 cs_etmv4_get_config(struct auxtrace_record *itr)
 
 static size_t
 cs_etm_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-		      struct perf_evlist *evlist __maybe_unused)
+		      struct evlist *evlist __maybe_unused)
 {
 	int i;
 	int etmv3 = 0, etmv4 = 0;
tools/perf/arch/arm64/util/arm-spe.c +3 -3
index 2c009aa74633..e0be366f72b3 100644
@@ -27,12 +27,12 @@
 struct arm_spe_recording {
 	struct auxtrace_record		itr;
 	struct perf_pmu			*arm_spe_pmu;
-	struct perf_evlist		*evlist;
+	struct evlist		*evlist;
 };
 
 static size_t
 arm_spe_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-		       struct perf_evlist *evlist __maybe_unused)
+		       struct evlist *evlist __maybe_unused)
 {
 	return ARM_SPE_AUXTRACE_PRIV_SIZE;
 }
@@ -59,7 +59,7 @@ static int arm_spe_info_fill(struct auxtrace_record *itr,
 }
 
 static int arm_spe_recording_options(struct auxtrace_record *itr,
-				     struct perf_evlist *evlist,
+				     struct evlist *evlist,
 				     struct record_opts *opts)
 {
 	struct arm_spe_recording *sper =
tools/perf/arch/powerpc/util/kvm-stat.c +3 -3
index 557c474f0a4b..28fc0bab370f 100644
@@ -106,7 +106,7 @@ const char * const kvm_skip_events[] = {
 };
 
 
-static int is_tracepoint_available(const char *str, struct perf_evlist *evlist)
+static int is_tracepoint_available(const char *str, struct evlist *evlist)
 {
 	struct parse_events_error err;
 	int ret;
@@ -119,7 +119,7 @@ static int is_tracepoint_available(const char *str, struct perf_evlist *evlist)
 }
 
 static int ppc__setup_book3s_hv(struct perf_kvm_stat *kvm,
-				struct perf_evlist *evlist)
+				struct evlist *evlist)
 {
 	const char **events_ptr;
 	int i, nr_tp = 0, err = -1;
@@ -146,7 +146,7 @@ static int ppc__setup_book3s_hv(struct perf_kvm_stat *kvm,
 /* Wrapper to setup kvm tracepoints */
 static int ppc__setup_kvm_tp(struct perf_kvm_stat *kvm)
 {
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
 	if (evlist == NULL)
 		return -ENOMEM;
tools/perf/arch/s390/util/auxtrace.c +3 -3
index aec819b945c5..833f60fa9c5a 100644
@@ -20,7 +20,7 @@ static void cpumsf_free(struct auxtrace_record *itr)
 }
 
 static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-				    struct perf_evlist *evlist __maybe_unused)
+				    struct evlist *evlist __maybe_unused)
 {
 	return 0;
 }
@@ -43,7 +43,7 @@ cpumsf_reference(struct auxtrace_record *itr __maybe_unused)
 
 static int
 cpumsf_recording_options(struct auxtrace_record *ar __maybe_unused,
-			 struct perf_evlist *evlist __maybe_unused,
+			 struct evlist *evlist __maybe_unused,
 			 struct record_opts *opts)
 {
 	unsigned int factor = 1;
@@ -82,7 +82,7 @@ cpumsf_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
  * auxtrace_record__init is called when perf record
  * check if the event really need auxtrace
  */
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
 					      int *err)
 {
 	struct auxtrace_record *aux;
tools/perf/arch/x86/tests/intel-cqm.c +1 -1
index b88ed71b2e3f..333b2f0d61e4 100644
@@ -40,7 +40,7 @@ static pid_t spawn(void)
  */
 int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	struct perf_event_attr pe;
 	int i, fd[2], flag, ret;
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index 43fc7d426d93..d7092fc00e3b 100644
@@ -51,7 +51,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	int err = -1, ret, i;
 	const char *comm1, *comm2;
tools/perf/arch/x86/util/auxtrace.c +2 -2
index 02f192114448..6b3ad5c826fd 100644
@@ -16,7 +16,7 @@
 #include "../../util/evlist.h"
 
 static
-struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
 						    int *err)
 {
 	struct perf_pmu *intel_pt_pmu;
@@ -50,7 +50,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
 	return NULL;
 }
 
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
 					      int *err)
 {
 	char buffer[64];
tools/perf/arch/x86/util/intel-bts.c +3 -3
index 59685a19c3b9..c845531d383a 100644
@@ -35,7 +35,7 @@ struct intel_bts_snapshot_ref {
 struct intel_bts_recording {
 	struct auxtrace_record		itr;
 	struct perf_pmu			*intel_bts_pmu;
-	struct perf_evlist		*evlist;
+	struct evlist		*evlist;
 	bool				snapshot_mode;
 	size_t				snapshot_size;
 	int				snapshot_ref_cnt;
@@ -50,7 +50,7 @@ struct branch {
 
 static size_t
 intel_bts_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-			 struct perf_evlist *evlist __maybe_unused)
+			 struct evlist *evlist __maybe_unused)
 {
 	return INTEL_BTS_AUXTRACE_PRIV_SIZE;
 }
@@ -99,7 +99,7 @@ static int intel_bts_info_fill(struct auxtrace_record *itr,
 }
 
 static int intel_bts_recording_options(struct auxtrace_record *itr,
-				       struct perf_evlist *evlist,
+				       struct evlist *evlist,
 				       struct record_opts *opts)
 {
 	struct intel_bts_recording *btsr =
tools/perf/arch/x86/util/intel-pt.c +7 -7
index b42df73fd7ff..e4dfe8c3d5c3 100644
@@ -44,7 +44,7 @@ struct intel_pt_recording {
 	struct auxtrace_record		itr;
 	struct perf_pmu			*intel_pt_pmu;
 	int				have_sched_switch;
-	struct perf_evlist		*evlist;
+	struct evlist		*evlist;
 	bool				snapshot_mode;
 	bool				snapshot_init_done;
 	size_t				snapshot_size;
@@ -110,7 +110,7 @@ static u64 intel_pt_masked_bits(u64 mask, u64 bits)
 }
 
 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
-				struct perf_evlist *evlist, u64 *res)
+				struct evlist *evlist, u64 *res)
 {
 	struct evsel *evsel;
 	u64 mask;
@@ -132,7 +132,7 @@ static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
 }
 
 static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu,
-				  struct perf_evlist *evlist)
+				  struct evlist *evlist)
 {
 	u64 val;
 	int err, topa_multiple_entries;
@@ -268,7 +268,7 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
 	return attr;
 }
 
-static const char *intel_pt_find_filter(struct perf_evlist *evlist,
+static const char *intel_pt_find_filter(struct evlist *evlist,
 					struct perf_pmu *intel_pt_pmu)
 {
 	struct evsel *evsel;
@@ -289,7 +289,7 @@ static size_t intel_pt_filter_bytes(const char *filter)
 }
 
 static size_t
-intel_pt_info_priv_size(struct auxtrace_record *itr, struct perf_evlist *evlist)
+intel_pt_info_priv_size(struct auxtrace_record *itr, struct evlist *evlist)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
@@ -398,7 +398,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr,
 	return 0;
 }
 
-static int intel_pt_track_switches(struct perf_evlist *evlist)
+static int intel_pt_track_switches(struct evlist *evlist)
 {
 	const char *sched_switch = "sched:sched_switch";
 	struct evsel *evsel;
@@ -549,7 +549,7 @@ static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
 }
 
 static int intel_pt_recording_options(struct auxtrace_record *itr,
-				      struct perf_evlist *evlist,
+				      struct evlist *evlist,
 				      struct record_opts *opts)
 {
 	struct intel_pt_recording *ptr =
tools/perf/builtin-c2c.c +2 -2
index d251a486f329..f0aae6e13a33 100644
@@ -2236,7 +2236,7 @@ static void print_pareto(FILE *out)
 
 static void print_c2c_info(FILE *out, struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 	bool first = true;
 
@@ -2567,7 +2567,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
 	return parse_callchain_report_opt(arg);
 }
 
-static int setup_callchain(struct perf_evlist *evlist)
+static int setup_callchain(struct evlist *evlist)
 {
 	u64 sample_type = perf_evlist__combined_sample_type(evlist);
 	enum perf_call_graph_mode mode = CALLCHAIN_NONE;
tools/perf/builtin-diff.c +4 -4
index c3b4b8196e00..e91c0d798181 100644
@@ -449,7 +449,7 @@ static struct perf_diff pdiff = {
 };
 
 static struct evsel *evsel_match(struct evsel *evsel,
-				      struct perf_evlist *evlist)
+				      struct evlist *evlist)
 {
 	struct evsel *e;
 
@@ -461,7 +461,7 @@ static struct evsel *evsel_match(struct evsel *evsel,
 	return NULL;
 }
 
-static void perf_evlist__collapse_resort(struct perf_evlist *evlist)
+static void perf_evlist__collapse_resort(struct evlist *evlist)
 {
 	struct evsel *evsel;
 
@@ -1009,7 +1009,7 @@ static void data__fprintf(void)
 
 static void data_process(void)
 {
-	struct perf_evlist *evlist_base = data__files[0].session->evlist;
+	struct evlist *evlist_base = data__files[0].session->evlist;
 	struct evsel *evsel_base;
 	bool first = true;
 
@@ -1019,7 +1019,7 @@ static void data_process(void)
 		int i;
 
 		data__for_each_file_new(i, d) {
-			struct perf_evlist *evlist = d->session->evlist;
+			struct evlist *evlist = d->session->evlist;
 			struct evsel *evsel;
 			struct hists *hists;
 
tools/perf/builtin-ftrace.c +1 -1
index 3e81e0b6628f..1263987c291a 100644
@@ -27,7 +27,7 @@
 #define DEFAULT_TRACER  "function_graph"
 
 struct perf_ftrace {
-	struct perf_evlist	*evlist;
+	struct evlist		*evlist;
 	struct target		target;
 	const char		*tracer;
 	struct list_head	filters;
tools/perf/builtin-inject.c +4 -4
index 646a1bf790fc..d2131fc863be 100644
@@ -96,7 +96,7 @@ static int perf_event__repipe_op2_synth(struct perf_session *session,
 
 static int perf_event__repipe_attr(struct perf_tool *tool,
 				   union perf_event *event,
-				   struct perf_evlist **pevlist)
+				   struct evlist **pevlist)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject,
 						  tool);
@@ -567,7 +567,7 @@ static int drop_sample(struct perf_tool *tool __maybe_unused,
 
 static void strip_init(struct perf_inject *inject)
 {
-	struct perf_evlist *evlist = inject->session->evlist;
+	struct evlist *evlist = inject->session->evlist;
 	struct evsel *evsel;
 
 	inject->tool.context_switch = perf_event__drop;
@@ -590,7 +590,7 @@ static bool has_tracking(struct evsel *evsel)
  * their selected event to exist, except if there is only 1 selected event left
  * and it has a compatible sample type.
  */
-static bool ok_to_remove(struct perf_evlist *evlist,
+static bool ok_to_remove(struct evlist *evlist,
 			 struct evsel *evsel_to_remove)
 {
 	struct evsel *evsel;
@@ -614,7 +614,7 @@ static bool ok_to_remove(struct perf_evlist *evlist,
 
 static void strip_fini(struct perf_inject *inject)
 {
-	struct perf_evlist *evlist = inject->session->evlist;
+	struct evlist *evlist = inject->session->evlist;
 	struct evsel *evsel, *tmp;
 
 	/* Remove non-synthesized evsels if possible */
tools/perf/builtin-kvm.c +4 -4
index cf8f27d05296..963dddc5853d 100644
@@ -743,7 +743,7 @@ static bool verify_vcpu(int vcpu)
 static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
 				   u64 *mmap_time)
 {
-	struct perf_evlist *evlist = kvm->evlist;
+	struct evlist *evlist = kvm->evlist;
 	union perf_event *event;
 	struct perf_mmap *md;
 	u64 timestamp;
@@ -1012,7 +1012,7 @@ static int kvm_live_open_events(struct perf_kvm_stat *kvm)
 {
 	int err, rc = -1;
 	struct evsel *pos;
-	struct perf_evlist *evlist = kvm->evlist;
+	struct evlist *evlist = kvm->evlist;
 	char sbuf[STRERR_BUFSIZE];
 
 	perf_evlist__config(evlist, &kvm->opts, NULL);
@@ -1283,9 +1283,9 @@ kvm_events_report(struct perf_kvm_stat *kvm, int argc, const char **argv)
 }
 
 #ifdef HAVE_TIMERFD_SUPPORT
-static struct perf_evlist *kvm_live_event_list(void)
+static struct evlist *kvm_live_event_list(void)
 {
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	char *tp, *name, *sys;
 	int err = -1;
 	const char * const *events_tp;
tools/perf/builtin-record.c +7 -7
index 7ba3a2c32e54..f08d1e6a1651 100644
@@ -73,7 +73,7 @@ struct record {
 	u64			bytes_written;
 	struct perf_data	data;
 	struct auxtrace_record	*itr;
-	struct perf_evlist	*evlist;
+	struct evlist	*evlist;
 	struct perf_session	*session;
 	int			realtime_prio;
 	bool			no_buildid;
@@ -346,7 +346,7 @@ static void record__aio_set_pos(int trace_fd, off_t pos)
 static void record__aio_mmap_read_sync(struct record *rec)
 {
 	int i;
-	struct perf_evlist *evlist = rec->evlist;
+	struct evlist *evlist = rec->evlist;
 	struct perf_mmap *maps = evlist->mmap;
 
 	if (!record__aio_enabled(rec))
@@ -672,7 +672,7 @@ static int record__auxtrace_init(struct record *rec __maybe_unused)
 #endif
 
 static int record__mmap_evlist(struct record *rec,
-			       struct perf_evlist *evlist)
+			       struct evlist *evlist)
 {
 	struct record_opts *opts = &rec->opts;
 	char msg[512];
@@ -714,7 +714,7 @@ static int record__open(struct record *rec)
 {
 	char msg[BUFSIZ];
 	struct evsel *pos;
-	struct perf_evlist *evlist = rec->evlist;
+	struct evlist *evlist = rec->evlist;
 	struct perf_session *session = rec->session;
 	struct record_opts *opts = &rec->opts;
 	int rc = 0;
@@ -904,7 +904,7 @@ static size_t zstd_compress(struct perf_session *session, void *dst, size_t dst_
 	return compressed;
 }
 
-static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evlist,
+static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist,
 				    bool overwrite, bool synch)
 {
 	u64 bytes_written = rec->bytes_written;
@@ -1165,7 +1165,7 @@ perf_event__synth_time_conv(const struct perf_event_mmap_page *pc __maybe_unused
 }
 
 static const struct perf_event_mmap_page *
-perf_evlist__pick_pc(struct perf_evlist *evlist)
+perf_evlist__pick_pc(struct evlist *evlist)
 {
 	if (evlist) {
 		if (evlist->mmap && evlist->mmap[0].base)
@@ -1313,7 +1313,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
 	struct perf_data *data = &rec->data;
 	struct perf_session *session;
 	bool disabled = false, draining = false;
-	struct perf_evlist *sb_evlist = NULL;
+	struct evlist *sb_evlist = NULL;
 	int fd;
 	float ratio = 0;
 
tools/perf/builtin-report.c +4 -4
index 96a506f0d4c1..e258e988c55b 100644
@@ -193,7 +193,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
 }
 
 static void setup_forced_leader(struct report *report,
-				struct perf_evlist *evlist)
+				struct evlist *evlist)
 {
 	if (report->group_set)
 		perf_evlist__force_leader(evlist);
@@ -459,7 +459,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	return ret + fprintf(fp, "\n#\n");
 }
 
-static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
+static int perf_evlist__tty_browse_hists(struct evlist *evlist,
 					 struct report *rep,
 					 const char *help)
 {
@@ -532,7 +532,7 @@ static void report__warn_kptr_restrict(const struct report *rep)
 
 static int report__gtk_browse_hists(struct report *rep, const char *help)
 {
-	int (*hist_browser)(struct perf_evlist *evlist, const char *help,
+	int (*hist_browser)(struct evlist *evlist, const char *help,
 			    struct hist_browser_timer *timer, float min_pcnt);
 
 	hist_browser = dlsym(perf_gtk_handle, "perf_evlist__gtk_browse_hists");
@@ -549,7 +549,7 @@ static int report__browse_hists(struct report *rep)
 {
 	int ret;
 	struct perf_session *session = rep->session;
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	const char *help = perf_tip(system_path(TIPDIR));
 
 	if (help == NULL) {
tools/perf/builtin-sched.c +2 -2
index 55779f496d27..c02ecb295f23 100644
@@ -2924,7 +2924,7 @@ static int perf_timehist__process_sample(struct perf_tool *tool,
 }
 
 static int timehist_check_attr(struct perf_sched *sched,
-			       struct perf_evlist *evlist)
+			       struct evlist *evlist)
 {
 	struct evsel *evsel;
 	struct evsel_runtime *er;
@@ -2963,7 +2963,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	};
 
 	struct perf_session *session;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	int err = -1;
 
 	/*
tools/perf/builtin-script.c +5 -5
index 4f9c8bb7620d..d741c0aa2750 100644
@@ -1636,7 +1636,7 @@ struct perf_script {
 	int			range_num;
 };
 
-static int perf_evlist__max_name_len(struct perf_evlist *evlist)
+static int perf_evlist__max_name_len(struct evlist *evlist)
 {
 	struct evsel *evsel;
 	int max = 0;
@@ -2018,10 +2018,10 @@ static int process_sample_event(struct perf_tool *tool,
 }
 
 static int process_attr(struct perf_tool *tool, union perf_event *event,
-			struct perf_evlist **pevlist)
+			struct evlist **pevlist)
 {
 	struct perf_script *scr = container_of(tool, struct perf_script, tool);
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct evsel *evsel, *pos;
 	int err;
 	static struct evsel_script *es;
@@ -2388,7 +2388,7 @@ static void sig_handler(int sig __maybe_unused)
 
 static void perf_script__fclose_per_event_dump(struct perf_script *script)
 {
-	struct perf_evlist *evlist = script->session->evlist;
+	struct evlist *evlist = script->session->evlist;
 	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
@@ -3256,7 +3256,7 @@ static int process_stat_config_event(struct perf_session *session __maybe_unused
 
 static int set_maps(struct perf_script *script)
 {
-	struct perf_evlist *evlist = script->session->evlist;
+	struct evlist *evlist = script->session->evlist;
 
 	if (!script->cpus || !script->threads)
 		return 0;
tools/perf/builtin-stat.c +1 -1
index e0ba97018ad7..4e61f8a1d22b 100644
@@ -130,7 +130,7 @@ static const char *smi_cost_attrs = {
 	"}"
 };
 
-static struct perf_evlist	*evsel_list;
+static struct evlist	*evsel_list;
 
 static struct target target = {
 	.uid	= UINT_MAX,
tools/perf/builtin-top.c +7 -7
index 2f22f313985e..c29fa1de854f 100644
@@ -839,7 +839,7 @@ static u64 last_timestamp;
 static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 {
 	struct record_opts *opts = &top->record_opts;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct perf_mmap *md;
 	union perf_event *event;
 
@@ -874,7 +874,7 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 static void perf_top__mmap_read(struct perf_top *top)
 {
 	bool overwrite = top->record_opts.overwrite;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	int i;
 
 	if (overwrite)
@@ -909,7 +909,7 @@ static void perf_top__mmap_read(struct perf_top *top)
 static int perf_top__overwrite_check(struct perf_top *top)
 {
 	struct record_opts *opts = &top->record_opts;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct perf_evsel_config_term *term;
 	struct list_head *config_terms;
 	struct evsel *evsel;
@@ -955,7 +955,7 @@ static int perf_top_overwrite_fallback(struct perf_top *top,
 				       struct evsel *evsel)
 {
 	struct record_opts *opts = &top->record_opts;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct evsel *counter;
 
 	if (!opts->overwrite)
@@ -976,7 +976,7 @@ static int perf_top__start_counters(struct perf_top *top)
 {
 	char msg[BUFSIZ];
 	struct evsel *counter;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct record_opts *opts = &top->record_opts;
 
 	if (perf_top__overwrite_check(top)) {
@@ -1100,7 +1100,7 @@ static int deliver_event(struct ordered_events *qe,
 			 struct ordered_event *qevent)
 {
 	struct perf_top *top = qe->data;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct perf_session *session = top->session;
 	union perf_event *event = qevent->event;
 	struct perf_sample sample;
@@ -1511,7 +1511,7 @@ int cmd_top(int argc, const char **argv)
 		    "Record namespaces events"),
 	OPT_END()
 	};
-	struct perf_evlist *sb_evlist = NULL;
+	struct evlist *sb_evlist = NULL;
 	const char * const top_usage[] = {
 		"perf top [<options>]",
 		NULL
tools/perf/builtin-trace.c +8 -8
index 506351d74cbc..dffff18f74cd 100644
@@ -97,7 +97,7 @@ struct trace {
 		struct bpf_map *map;
 	} dump;
 	struct record_opts	opts;
-	struct perf_evlist	*evlist;
+	struct evlist	*evlist;
 	struct machine		*host;
 	struct thread		*current;
 	struct bpf_object	*bpf_obj;
@@ -1389,7 +1389,7 @@ static char *trace__machine__resolve_kernel_addr(void *vmachine, unsigned long l
 	return machine__resolve_kernel_addr(vmachine, addrp, modp);
 }
 
-static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
+static int trace__symbols_init(struct trace *trace, struct evlist *evlist)
 {
 	int err = symbol__init(NULL);
 
@@ -2628,7 +2628,7 @@ static int trace__record(struct trace *trace, int argc, const char **argv)
 
 static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
 
-static bool perf_evlist__add_vfs_getname(struct perf_evlist *evlist)
+static bool perf_evlist__add_vfs_getname(struct evlist *evlist)
 {
 	bool found = false;
 	struct evsel *evsel, *tmp;
@@ -2711,7 +2711,7 @@ static void trace__handle_event(struct trace *trace, union perf_event *event, st
 static int trace__add_syscall_newtp(struct trace *trace)
 {
 	int ret = -1;
-	struct perf_evlist *evlist = trace->evlist;
+	struct evlist *evlist = trace->evlist;
 	struct evsel *sys_enter, *sys_exit;
 
 	sys_enter = perf_evsel__raw_syscall_newtp("sys_enter", trace__sys_enter);
@@ -3191,7 +3191,7 @@ static int trace__set_filter_pids(struct trace *trace)
 
 static int __trace__deliver_event(struct trace *trace, union perf_event *event)
 {
-	struct perf_evlist *evlist = trace->evlist;
+	struct evlist *evlist = trace->evlist;
 	struct perf_sample sample;
 	int err;
 
@@ -3249,7 +3249,7 @@ static int ordered_events__deliver_event(struct ordered_events *oe,
 
 static int trace__run(struct trace *trace, int argc, const char **argv)
 {
-	struct perf_evlist *evlist = trace->evlist;
+	struct evlist *evlist = trace->evlist;
 	struct evsel *evsel, *pgfault_maj = NULL, *pgfault_min = NULL;
 	int err = -1, i;
 	unsigned long before;
@@ -3842,7 +3842,7 @@ static int parse_pagefaults(const struct option *opt, const char *str,
 	return 0;
 }
 
-static void evlist__set_evsel_handler(struct perf_evlist *evlist, void *handler)
+static void evlist__set_evsel_handler(struct evlist *evlist, void *handler)
 {
 	struct evsel *evsel;
 
@@ -3850,7 +3850,7 @@ static void evlist__set_evsel_handler(struct perf_evlist *evlist, void *handler)
 		evsel->handler = handler;
 }
 
-static int evlist__set_syscall_tp_fields(struct perf_evlist *evlist)
+static int evlist__set_syscall_tp_fields(struct evlist *evlist)
 {
 	struct evsel *evsel;
 
tools/perf/tests/backward-ring-buffer.c +3 -3
index 921af318507c..3f9c931069b0 100644
@@ -25,7 +25,7 @@ static void testcase(void)
 	}
 }
 
-static int count_samples(struct perf_evlist *evlist, int *sample_count,
+static int count_samples(struct evlist *evlist, int *sample_count,
 			 int *comm_count)
 {
 	int i;
@@ -55,7 +55,7 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count,
 	return TEST_OK;
 }
 
-static int do_test(struct perf_evlist *evlist, int mmap_pages,
+static int do_test(struct evlist *evlist, int mmap_pages,
 		   int *sample_count, int *comm_count)
 {
 	int err;
@@ -82,7 +82,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
 {
 	int ret = TEST_SKIP, err, sample_count = 0, comm_count = 0;
 	char pid[16], sbuf[STRERR_BUFSIZE];
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct evsel *evsel __maybe_unused;
 	struct parse_events_error parse_error;
 	struct record_opts opts = {
tools/perf/tests/bpf.c +1 -1
index c9e4cdc4c9c8..95a15b51f95c 100644
@@ -118,7 +118,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
 
 	char pid[16];
 	char sbuf[STRERR_BUFSIZE];
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	int i, ret = TEST_FAIL, err = 0, count = 0;
 
 	struct parse_events_state parse_state;
tools/perf/tests/code-reading.c +4 -4
index 062d23bba2df..168deb9c563e 100644
@@ -362,7 +362,7 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
 }
 
 static int process_sample_event(struct machine *machine,
-				struct perf_evlist *evlist,
+				struct evlist *evlist,
 				union perf_event *event, struct state *state)
 {
 	struct perf_sample sample;
@@ -385,7 +385,7 @@ static int process_sample_event(struct machine *machine,
 	return ret;
 }
 
-static int process_event(struct machine *machine, struct perf_evlist *evlist,
+static int process_event(struct machine *machine, struct evlist *evlist,
 			 union perf_event *event, struct state *state)
 {
 	if (event->header.type == PERF_RECORD_SAMPLE)
@@ -408,7 +408,7 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist,
 	return 0;
 }
 
-static int process_events(struct machine *machine, struct perf_evlist *evlist,
+static int process_events(struct machine *machine, struct evlist *evlist,
 			  struct state *state)
 {
 	union perf_event *event;
@@ -554,7 +554,7 @@ static int do_test_code_reading(bool try_kcore)
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	int err = -1, ret;
 	pid_t pid;
tools/perf/tests/event-times.c +10 -10
index 45fe674233d7..c3545a6efcbc 100644
@@ -12,7 +12,7 @@
 #include "thread_map.h"
 #include "target.h"
 
-static int attach__enable_on_exec(struct perf_evlist *evlist)
+static int attach__enable_on_exec(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct target target = {
@@ -48,13 +48,13 @@ static int attach__enable_on_exec(struct perf_evlist *evlist)
 	return perf_evlist__start_workload(evlist) == 1 ? TEST_OK : TEST_FAIL;
 }
 
-static int detach__enable_on_exec(struct perf_evlist *evlist)
+static int detach__enable_on_exec(struct evlist *evlist)
 {
 	waitpid(evlist->workload.pid, NULL, 0);
 	return 0;
 }
 
-static int attach__current_disabled(struct perf_evlist *evlist)
+static int attach__current_disabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
@@ -80,7 +80,7 @@ static int attach__current_disabled(struct perf_evlist *evlist)
 	return perf_evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL;
 }
 
-static int attach__current_enabled(struct perf_evlist *evlist)
+static int attach__current_enabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
@@ -100,14 +100,14 @@ static int attach__current_enabled(struct perf_evlist *evlist)
 	return err == 0 ? TEST_OK : TEST_FAIL;
 }
 
-static int detach__disable(struct perf_evlist *evlist)
+static int detach__disable(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 
 	return perf_evsel__enable(evsel);
 }
 
-static int attach__cpu_disabled(struct perf_evlist *evlist)
+static int attach__cpu_disabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
@@ -136,7 +136,7 @@ static int attach__cpu_disabled(struct perf_evlist *evlist)
 	return perf_evsel__enable(evsel);
 }
 
-static int attach__cpu_enabled(struct perf_evlist *evlist)
+static int attach__cpu_enabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
@@ -158,11 +158,11 @@ static int attach__cpu_enabled(struct perf_evlist *evlist)
 	return err ? TEST_FAIL : TEST_OK;
 }
 
-static int test_times(int (attach)(struct perf_evlist *),
-		      int (detach)(struct perf_evlist *))
+static int test_times(int (attach)(struct evlist *),
+		      int (detach)(struct evlist *))
 {
 	struct perf_counts_values count;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel;
 	int err = -1, i;
 
tools/perf/tests/event_update.c +1 -1
index 0e5a2e8195e4..eb0dd359762d 100644
@@ -79,7 +79,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 
 int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct evsel *evsel;
 	struct event_name tmp;
 
tools/perf/tests/evsel-roundtrip-name.c +2 -2
index bb38489eda1e..6cc408b23026 100644
@@ -12,7 +12,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 	char name[128];
 	int type, op, err = 0, ret = 0, i, idx;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
                 return -ENOMEM;
@@ -68,7 +68,7 @@ static int __perf_evsel__name_array_test(const char *names[], int nr_names)
 {
 	int i, err;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
                 return -ENOMEM;
tools/perf/tests/hists_cumulate.c +1 -1
index b62bf7c3bea2..d7a6b97683d6 100644
@@ -695,7 +695,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
 	struct machines machines;
 	struct machine *machine;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
 		test1,
tools/perf/tests/hists_filter.c +2 -2
index 3e679bb8da7f..9f0d6af839e9 100644
@@ -47,7 +47,7 @@ static struct sample fake_samples[] = {
 	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 3 },
 };
 
-static int add_hist_entries(struct perf_evlist *evlist,
+static int add_hist_entries(struct evlist *evlist,
 			    struct machine *machine)
 {
 	struct evsel *evsel;
@@ -109,7 +109,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
 	struct machines machines;
 	struct machine *machine;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
 	TEST_ASSERT_VAL("No memory", evlist);
 
tools/perf/tests/hists_link.c +2 -2
index 078ee9876980..6ab27dd3bf3f 100644
@@ -62,7 +62,7 @@ static struct sample fake_samples[][5] = {
 	},
 };
 
-static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
+static int add_hist_entries(struct evlist *evlist, struct machine *machine)
 {
 	struct evsel *evsel;
 	struct addr_location al;
@@ -272,7 +272,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
 	struct machines machines;
 	struct machine *machine = NULL;
 	struct evsel *evsel, *first;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
 	if (evlist == NULL)
                 return -ENOMEM;
tools/perf/tests/hists_output.c +1 -1
index 5cd4b1baa9d1..cd36e51cdf3b 100644
@@ -581,7 +581,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
 	struct machines machines;
 	struct machine *machine;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
 		test1,
tools/perf/tests/keep-tracking.c +2 -2
index 8ada3e63f1ba..e0779f2a340c 100644
@@ -24,7 +24,7 @@
 	}					\
 }
 
-static int find_comm(struct perf_evlist *evlist, const char *comm)
+static int find_comm(struct evlist *evlist, const char *comm)
 {
 	union perf_event *event;
 	struct perf_mmap *md;
@@ -67,7 +67,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	int found, err = -1;
 	const char *comm;
tools/perf/tests/mmap-basic.c +1 -1
index 76ee42eb1355..749b580e9a92 100644
@@ -29,7 +29,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 	union perf_event *event;
 	struct perf_thread_map *threads;
 	struct perf_cpu_map *cpus;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	cpu_set_t cpu_set;
 	const char *syscall_names[] = { "getsid", "getppid", "getpgid", };
 	pid_t (*syscalls[])(void) = { (void *)getsid, getppid, (void*)getpgid };
tools/perf/tests/openat-syscall-tp-fields.c +1 -1
index 2e467448e220..69bf0ec2fe5f 100644
@@ -32,7 +32,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
 	};
 	const char *filename = "/etc/passwd";
 	int flags = O_RDONLY | O_DIRECTORY;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 	struct evsel *evsel;
 	int err = -1, i, nr_events = 0, nr_polls = 0;
 	char sbuf[STRERR_BUFSIZE];
tools/perf/tests/parse-events.c +63 -63

504 lines not on this page · raw message

tools/perf/tests/parse-no-sample-id-all.c +2 -2
index 2196d1497c0c..fc0213246aaf 100644
@@ -11,7 +11,7 @@
 #include "util.h"
 #include "debug.h"
 
-static int process_event(struct perf_evlist **pevlist, union perf_event *event)
+static int process_event(struct evlist **pevlist, union perf_event *event)
 {
 	struct perf_sample sample;
 
@@ -39,7 +39,7 @@ static int process_event(struct perf_evlist **pevlist, union perf_event *event)
 
 static int process_events(union perf_event **events, size_t count)
 {
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	int err = 0;
 	size_t i;
 
tools/perf/tests/perf-record.c +1 -1
index 7e576c2db941..99b2d26881f9 100644
@@ -50,7 +50,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
 	};
 	cpu_set_t cpu_mask;
 	size_t cpu_mask_size = sizeof(cpu_mask);
-	struct perf_evlist *evlist = perf_evlist__new_dummy();
+	struct evlist *evlist = perf_evlist__new_dummy();
 	struct evsel *evsel;
 	struct perf_sample sample;
 	const char *cmd = "sleep";
tools/perf/tests/sw-clock.c +1 -1
index 620a99aad1e3..69b997eeb639 100644
@@ -28,7 +28,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 	char sbuf[STRERR_BUFSIZE];
 	union perf_event *event;
 	struct evsel *evsel;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct perf_event_attr attr = {
 		.type = PERF_TYPE_SOFTWARE,
 		.config = clock_id,
tools/perf/tests/switch-tracking.c +5 -5
index a946b9fa60dd..3e26ea36ec29 100644
@@ -113,7 +113,7 @@ static int check_cpu(struct switch_tracking *switch_tracking, int cpu)
 	return 0;
 }
 
-static int process_sample_event(struct perf_evlist *evlist,
+static int process_sample_event(struct evlist *evlist,
 				union perf_event *event,
 				struct switch_tracking *switch_tracking)
 {
@@ -163,7 +163,7 @@ static int process_sample_event(struct perf_evlist *evlist,
 	return 0;
 }
 
-static int process_event(struct perf_evlist *evlist, union perf_event *event,
+static int process_event(struct evlist *evlist, union perf_event *event,
 			 struct switch_tracking *switch_tracking)
 {
 	if (event->header.type == PERF_RECORD_SAMPLE)
@@ -203,7 +203,7 @@ struct event_node {
 	u64 event_time;
 };
 
-static int add_event(struct perf_evlist *evlist, struct list_head *events,
+static int add_event(struct evlist *evlist, struct list_head *events,
 		     union perf_event *event)
 {
 	struct perf_sample sample;
@@ -252,7 +252,7 @@ static int compar(const void *a, const void *b)
 	return cmp;
 }
 
-static int process_events(struct perf_evlist *evlist,
+static int process_events(struct evlist *evlist,
 			  struct switch_tracking *switch_tracking)
 {
 	union perf_event *event;
@@ -329,7 +329,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
 	struct evsel *switch_evsel, *tracking_evsel;
 	const char *comm;
tools/perf/tests/task-exit.c +1 -1
index e6fb4b8d8bc2..5c2cdb0ccb96 100644
@@ -38,7 +38,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
 	int err = -1;
 	union perf_event *event;
 	struct evsel *evsel;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct target target = {
 		.uid		= UINT_MAX,
 		.uses_mmap	= true,
tools/perf/tests/time-utils-test.c +1 -1
index 4f53006233a1..fe57ca3b6e54 100644
@@ -69,7 +69,7 @@ struct test_data {
 
 static bool test__perf_time__parse_for_ranges(struct test_data *d)
 {
-	struct perf_evlist evlist = {
+	struct evlist evlist = {
 		.first_sample_time = d->first,
 		.last_sample_time = d->last,
 	};
tools/perf/ui/browsers/hists.c +3 -3
index 9bc818621eb6..b83258bece05 100644
@@ -3262,7 +3262,7 @@ static int perf_evsel_menu__run(struct evsel_menu *menu,
 				struct hist_browser_timer *hbt,
 				bool warn_lost_event)
 {
-	struct perf_evlist *evlist = menu->b.priv;
+	struct evlist *evlist = menu->b.priv;
 	struct evsel *pos;
 	const char *title = "Available samples";
 	int delay_secs = hbt ? hbt->refresh : 0;
@@ -3359,7 +3359,7 @@ static bool filter_group_entries(struct ui_browser *browser __maybe_unused,
 	return false;
 }
 
-static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
+static int __perf_evlist__tui_browse_hists(struct evlist *evlist,
 					   int nr_entries, const char *help,
 					   struct hist_browser_timer *hbt,
 					   float min_pcnt,
@@ -3397,7 +3397,7 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
 				    hbt, warn_lost_event);
 }
 
-int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
+int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
 				  struct hist_browser_timer *hbt,
 				  float min_pcnt,
 				  struct perf_env *env,
tools/perf/ui/gtk/gtk.h +2 -2
index e2f5fbef3c9a..a9563932fa04 100644
@@ -53,11 +53,11 @@ static inline GtkWidget *perf_gtk__setup_info_bar(void)
 #endif
 
 struct evsel;
-struct perf_evlist;
+struct evlist;
 struct hist_entry;
 struct hist_browser_timer;
 
-int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
+int perf_evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
 				  struct hist_browser_timer *hbt,
 				  float min_pcnt);
 int hist_entry__gtk_annotate(struct hist_entry *he,
tools/perf/ui/gtk/hists.c +1 -1
index d5c9fe230632..1b181d8ea953 100644
@@ -590,7 +590,7 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists,
 	gtk_container_add(GTK_CONTAINER(window), view);
 }
 
-int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist,
+int perf_evlist__gtk_browse_hists(struct evlist *evlist,
 				  const char *help,
 				  struct hist_browser_timer *hbt __maybe_unused,
 				  float min_pcnt)
tools/perf/ui/hist.c +1 -1
index 214af526901b..8c7fb11edc60 100644
@@ -795,7 +795,7 @@ static int add_hierarchy_fmt(struct hists *hists, struct perf_hpp_fmt *fmt)
 }
 
 int perf_hpp__setup_hists_formats(struct perf_hpp_list *list,
-				  struct perf_evlist *evlist)
+				  struct evlist *evlist)
 {
 	struct evsel *evsel;
 	struct perf_hpp_fmt *fmt;
tools/perf/util/auxtrace.c +5 -5
index 98b151bc9a36..9ec2841ddec4 100644
@@ -124,7 +124,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
 }
 
 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
-				   struct perf_evlist *evlist, int idx,
+				   struct evlist *evlist, int idx,
 				   bool per_cpu)
 {
 	mp->idx = idx;
@@ -503,7 +503,7 @@ void auxtrace_heap__pop(struct auxtrace_heap *heap)
 }
 
 size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
-				       struct perf_evlist *evlist)
+				       struct evlist *evlist)
 {
 	if (itr)
 		return itr->info_priv_size(itr, evlist);
@@ -556,7 +556,7 @@ int auxtrace_record__find_snapshot(struct auxtrace_record *itr, int idx,
 }
 
 int auxtrace_record__options(struct auxtrace_record *itr,
-			     struct perf_evlist *evlist,
+			     struct evlist *evlist,
 			     struct record_opts *opts)
 {
 	if (itr)
@@ -585,7 +585,7 @@ int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
 }
 
 struct auxtrace_record *__weak
-auxtrace_record__init(struct perf_evlist *evlist __maybe_unused, int *err)
+auxtrace_record__init(struct evlist *evlist __maybe_unused, int *err)
 {
 	*err = 0;
 	return NULL;
@@ -2160,7 +2160,7 @@ static int perf_evsel__nr_addr_filter(struct evsel *evsel)
 	return nr_addr_filters;
 }
 
-int auxtrace_parse_filters(struct perf_evlist *evlist)
+int auxtrace_parse_filters(struct evlist *evlist)
 {
 	struct evsel *evsel;
 	char *filter;
tools/perf/util/auxtrace.h +12 -12
index e9b4c5edf78b..17eb04a1da4d 100644
@@ -23,7 +23,7 @@
 
 union perf_event;
 struct perf_session;
-struct perf_evlist;
+struct evlist;
 struct perf_tool;
 struct perf_mmap;
 struct option;
@@ -309,10 +309,10 @@ struct auxtrace_mmap_params {
  */
 struct auxtrace_record {
 	int (*recording_options)(struct auxtrace_record *itr,
-				 struct perf_evlist *evlist,
+				 struct evlist *evlist,
 				 struct record_opts *opts);
 	size_t (*info_priv_size)(struct auxtrace_record *itr,
-				 struct perf_evlist *evlist);
+				 struct evlist *evlist);
 	int (*info_fill)(struct auxtrace_record *itr,
 			 struct perf_session *session,
 			 struct auxtrace_info_event *auxtrace_info,
@@ -432,7 +432,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
 				unsigned int auxtrace_pages,
 				bool auxtrace_overwrite);
 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
-				   struct perf_evlist *evlist, int idx,
+				   struct evlist *evlist, int idx,
 				   bool per_cpu);
 
 typedef int (*process_auxtrace_t)(struct perf_tool *tool,
@@ -482,17 +482,17 @@ int auxtrace_cache__add(struct auxtrace_cache *c, u32 key,
 			struct auxtrace_cache_entry *entry);
 void *auxtrace_cache__lookup(struct auxtrace_cache *c, u32 key);
 
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
 					      int *err);
 
 int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
 				    struct record_opts *opts,
 				    const char *str);
 int auxtrace_record__options(struct auxtrace_record *itr,
-			     struct perf_evlist *evlist,
+			     struct evlist *evlist,
 			     struct record_opts *opts);
 size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
-				       struct perf_evlist *evlist);
+				       struct evlist *evlist);
 int auxtrace_record__info_fill(struct auxtrace_record *itr,
 			       struct perf_session *session,
 			       struct auxtrace_info_event *auxtrace_info,
@@ -540,7 +540,7 @@ void addr_filters__init(struct addr_filters *filts);
 void addr_filters__exit(struct addr_filters *filts);
 int addr_filters__parse_bare_filter(struct addr_filters *filts,
 				    const char *filter);
-int auxtrace_parse_filters(struct perf_evlist *evlist);
+int auxtrace_parse_filters(struct evlist *evlist);
 
 static inline int auxtrace__process_event(struct perf_session *session,
 					  union perf_event *event,
@@ -613,7 +613,7 @@ void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts)
 #else
 
 static inline struct auxtrace_record *
-auxtrace_record__init(struct perf_evlist *evlist __maybe_unused,
+auxtrace_record__init(struct evlist *evlist __maybe_unused,
 		      int *err)
 {
 	*err = 0;
@@ -636,7 +636,7 @@ perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr __maybe_unused,
 
 static inline
 int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused,
-			     struct perf_evlist *evlist __maybe_unused,
+			     struct evlist *evlist __maybe_unused,
 			     struct record_opts *opts __maybe_unused)
 {
 	return 0;
@@ -733,7 +733,7 @@ void auxtrace_index__free(struct list_head *head __maybe_unused)
 }
 
 static inline
-int auxtrace_parse_filters(struct perf_evlist *evlist __maybe_unused)
+int auxtrace_parse_filters(struct evlist *evlist __maybe_unused)
 {
 	return 0;
 }
@@ -747,7 +747,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
 				unsigned int auxtrace_pages,
 				bool auxtrace_overwrite);
 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
-				   struct perf_evlist *evlist, int idx,
+				   struct evlist *evlist, int idx,
 				   bool per_cpu);
 
 #define ITRACE_HELP ""
tools/perf/util/bpf-event.c +1 -1
index 2a4a0da35632..5a5dcc6d8f85 100644
@@ -418,7 +418,7 @@ static int bpf_event__sb_cb(union perf_event *event, void *data)
 	return 0;
 }
 
-int bpf_event__add_sb_event(struct perf_evlist **evlist,
+int bpf_event__add_sb_event(struct evlist **evlist,
 			    struct perf_env *env)
 {
 	struct perf_event_attr attr = {
tools/perf/util/bpf-event.h +2 -2
index 04c33b3bfe28..26ab9239f986 100644
@@ -37,7 +37,7 @@ int perf_event__synthesize_bpf_events(struct perf_session *session,
 				      perf_event__handler_t process,
 				      struct machine *machine,
 				      struct record_opts *opts);
-int bpf_event__add_sb_event(struct perf_evlist **evlist,
+int bpf_event__add_sb_event(struct evlist **evlist,
 				 struct perf_env *env);
 void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info,
 				    struct perf_env *env,
@@ -58,7 +58,7 @@ static inline int perf_event__synthesize_bpf_events(struct perf_session *session
 	return 0;
 }
 
-static inline int bpf_event__add_sb_event(struct perf_evlist **evlist __maybe_unused,
+static inline int bpf_event__add_sb_event(struct evlist **evlist __maybe_unused,
 					  struct perf_env *env __maybe_unused)
 {
 	return 0;
tools/perf/util/bpf-loader.c +10 -10
index 594ea279e25b..b0696726ab76 100644
@@ -1043,7 +1043,7 @@ __bpf_map__config_value(struct bpf_map *map,
 static int
 bpf_map__config_value(struct bpf_map *map,
 		      struct parse_events_term *term,
-		      struct perf_evlist *evlist __maybe_unused)
+		      struct evlist *evlist __maybe_unused)
 {
 	if (!term->err_val) {
 		pr_debug("Config value not set\n");
@@ -1061,7 +1061,7 @@ bpf_map__config_value(struct bpf_map *map,
 static int
 __bpf_map__config_event(struct bpf_map *map,
 			struct parse_events_term *term,
-			struct perf_evlist *evlist)
+			struct evlist *evlist)
 {
 	struct evsel *evsel;
 	const struct bpf_map_def *def;
@@ -1103,7 +1103,7 @@ __bpf_map__config_event(struct bpf_map *map,
 static int
 bpf_map__config_event(struct bpf_map *map,
 		      struct parse_events_term *term,
-		      struct perf_evlist *evlist)
+		      struct evlist *evlist)
 {
 	if (!term->err_val) {
 		pr_debug("Config value not set\n");
@@ -1121,7 +1121,7 @@ bpf_map__config_event(struct bpf_map *map,
 struct bpf_obj_config__map_func {
 	const char *config_opt;
 	int (*config_func)(struct bpf_map *, struct parse_events_term *,
-			   struct perf_evlist *);
+			   struct evlist *);
 };
 
 struct bpf_obj_config__map_func bpf_obj_config__map_funcs[] = {
@@ -1169,7 +1169,7 @@ config_map_indices_range_check(struct parse_events_term *term,
 static int
 bpf__obj_config_map(struct bpf_object *obj,
 		    struct parse_events_term *term,
-		    struct perf_evlist *evlist,
+		    struct evlist *evlist,
 		    int *key_scan_pos)
 {
 	/* key is "map:<mapname>.<config opt>" */
@@ -1228,7 +1228,7 @@ bpf__obj_config_map(struct bpf_object *obj,
 
 int bpf__config_obj(struct bpf_object *obj,
 		    struct parse_events_term *term,
-		    struct perf_evlist *evlist,
+		    struct evlist *evlist,
 		    int *error_pos)
 {
 	int key_scan_pos = 0;
@@ -1523,7 +1523,7 @@ int bpf__apply_obj_config(void)
 			(strcmp(name, 			\
 				bpf_map__name(pos)) == 0))
 
-struct evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *name)
+struct evsel *bpf__setup_output_event(struct evlist *evlist, const char *name)
 {
 	struct bpf_map_priv *tmpl_priv = NULL;
 	struct bpf_object *obj, *tmp;
@@ -1600,7 +1600,7 @@ struct evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *na
 	return evsel;
 }
 
-int bpf__setup_stdout(struct perf_evlist *evlist)
+int bpf__setup_stdout(struct evlist *evlist)
 {
 	struct evsel *evsel = bpf__setup_output_event(evlist, "__bpf_stdout__");
 	return PTR_ERR_OR_ZERO(evsel);
@@ -1756,7 +1756,7 @@ int bpf__strerror_load(struct bpf_object *obj,
 
 int bpf__strerror_config_obj(struct bpf_object *obj __maybe_unused,
 			     struct parse_events_term *term __maybe_unused,
-			     struct perf_evlist *evlist __maybe_unused,
+			     struct evlist *evlist __maybe_unused,
 			     int *error_pos __maybe_unused, int err,
 			     char *buf, size_t size)
 {
@@ -1780,7 +1780,7 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size)
 	return 0;
 }
 
-int bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
+int bpf__strerror_setup_output_event(struct evlist *evlist __maybe_unused,
 				     int err, char *buf, size_t size)
 {
 	bpf__strerror_head(err, buf, size);
tools/perf/util/bpf-loader.h +12 -12
index e2048c978a24..25251d63164c 100644
@@ -40,7 +40,7 @@ enum bpf_loader_errno {
 };
 
 struct evsel;
-struct perf_evlist;
+struct evlist;
 struct bpf_object;
 struct parse_events_term;
 #define PERF_BPF_PROBE_GROUP "perf_bpf_probe"
@@ -70,18 +70,18 @@ int bpf__foreach_event(struct bpf_object *obj,
 		       bpf_prog_iter_callback_t func, void *arg);
 
 int bpf__config_obj(struct bpf_object *obj, struct parse_events_term *term,
-		    struct perf_evlist *evlist, int *error_pos);
+		    struct evlist *evlist, int *error_pos);
 int bpf__strerror_config_obj(struct bpf_object *obj,
 			     struct parse_events_term *term,
-			     struct perf_evlist *evlist,
+			     struct evlist *evlist,
 			     int *error_pos, int err, char *buf,
 			     size_t size);
 int bpf__apply_obj_config(void);
 int bpf__strerror_apply_obj_config(int err, char *buf, size_t size);
 
-int bpf__setup_stdout(struct perf_evlist *evlist);
-struct evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *name);
-int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size);
+int bpf__setup_stdout(struct evlist *evlist);
+struct evsel *bpf__setup_output_event(struct evlist *evlist, const char *name);
+int bpf__strerror_setup_output_event(struct evlist *evlist, int err, char *buf, size_t size);
 #else
 #include <errno.h>
 #include <string.h>
@@ -119,7 +119,7 @@ bpf__foreach_event(struct bpf_object *obj __maybe_unused,
 static inline int
 bpf__config_obj(struct bpf_object *obj __maybe_unused,
 		struct parse_events_term *term __maybe_unused,
-		struct perf_evlist *evlist __maybe_unused,
+		struct evlist *evlist __maybe_unused,
 		int *error_pos __maybe_unused)
 {
 	return 0;
@@ -132,13 +132,13 @@ bpf__apply_obj_config(void)
 }
 
 static inline int
-bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused)
+bpf__setup_stdout(struct evlist *evlist __maybe_unused)
 {
 	return 0;
 }
 
 static inline struct evsel *
-bpf__setup_output_event(struct perf_evlist *evlist __maybe_unused, const char *name __maybe_unused)
+bpf__setup_output_event(struct evlist *evlist __maybe_unused, const char *name __maybe_unused)
 {
 	return NULL;
 }
@@ -182,7 +182,7 @@ static inline int bpf__strerror_load(struct bpf_object *obj __maybe_unused,
 static inline int
 bpf__strerror_config_obj(struct bpf_object *obj __maybe_unused,
 			 struct parse_events_term *term __maybe_unused,
-			 struct perf_evlist *evlist __maybe_unused,
+			 struct evlist *evlist __maybe_unused,
 			 int *error_pos __maybe_unused,
 			 int err __maybe_unused,
 			 char *buf, size_t size)
@@ -198,7 +198,7 @@ bpf__strerror_apply_obj_config(int err __maybe_unused,
 }
 
 static inline int
-bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
+bpf__strerror_setup_output_event(struct evlist *evlist __maybe_unused,
 				 int err __maybe_unused, char *buf, size_t size)
 {
 	return __bpf_strerror(buf, size);
@@ -206,7 +206,7 @@ bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
 
 #endif
 
-static inline int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, char *buf, size_t size)
+static inline int bpf__strerror_setup_stdout(struct evlist *evlist, int err, char *buf, size_t size)
 {
 	return bpf__strerror_setup_output_event(evlist, err, buf, size);
 }
tools/perf/util/cgroup.c +5 -5
index 4f5c326a9477..deb87ecd3671 100644
@@ -90,7 +90,7 @@ static int open_cgroup(const char *name)
 	return fd;
 }
 
-static struct cgroup *evlist__find_cgroup(struct perf_evlist *evlist, const char *str)
+static struct cgroup *evlist__find_cgroup(struct evlist *evlist, const char *str)
 {
 	struct evsel *counter;
 	/*
@@ -130,14 +130,14 @@ static struct cgroup *cgroup__new(const char *name)
 	return NULL;
 }
 
-struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, const char *name)
+struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name)
 {
 	struct cgroup *cgroup = evlist__find_cgroup(evlist, name);
 
 	return cgroup ?: cgroup__new(name);
 }
 
-static int add_cgroup(struct perf_evlist *evlist, const char *str)
+static int add_cgroup(struct evlist *evlist, const char *str)
 {
 	struct evsel *counter;
 	struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str);
@@ -190,7 +190,7 @@ static void evsel__set_default_cgroup(struct evsel *evsel, struct cgroup *cgroup
 		evsel->cgrp = cgroup__get(cgroup);
 }
 
-void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgroup)
+void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup)
 {
 	struct evsel *evsel;
 
@@ -201,7 +201,7 @@ void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgrou
 int parse_cgroups(const struct option *opt, const char *str,
 		  int unset __maybe_unused)
 {
-	struct perf_evlist *evlist = *(struct perf_evlist **)opt->value;
+	struct evlist *evlist = *(struct evlist **)opt->value;
 	struct evsel *counter;
 	struct cgroup *cgrp = NULL;
 	const char *p, *e, *eos = str + strlen(str);
tools/perf/util/cgroup.h +3 -3
index f033a80c1b14..2ec11f01090d 100644
@@ -18,11 +18,11 @@ extern int nr_cgroups; /* number of explicit cgroups defined */
 struct cgroup *cgroup__get(struct cgroup *cgroup);
 void cgroup__put(struct cgroup *cgroup);
 
-struct perf_evlist;
+struct evlist;
 
-struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, const char *name);
+struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name);
 
-void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgroup);
+void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup);
 
 int parse_cgroups(const struct option *opt, const char *str, int unset);
 
tools/perf/util/data-convert-bt.c +2 -2
index 042ee5b6f9f1..083101ae7b77 100644
@@ -1201,7 +1201,7 @@ static int add_event(struct ctf_writer *cw, struct evsel *evsel)
 
 static int setup_events(struct ctf_writer *cw, struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 	int ret;
 
@@ -1308,7 +1308,7 @@ static int setup_non_sample_events(struct ctf_writer *cw,
 
 static void cleanup_events(struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c +97 -97

744 lines not on this page · raw message

tools/perf/util/evlist.h +80 -80

293 lines not on this page · raw message

tools/perf/util/evsel.c +2 -2
index 44421bbebd64..f7f97ca6e96d 100644
@@ -3044,7 +3044,7 @@ struct perf_env *perf_evsel__env(struct evsel *evsel)
 	return NULL;
 }
 
-static int store_evsel_ids(struct evsel *evsel, struct perf_evlist *evlist)
+static int store_evsel_ids(struct evsel *evsel, struct evlist *evlist)
 {
 	int cpu, thread;
 
@@ -3062,7 +3062,7 @@ static int store_evsel_ids(struct evsel *evsel, struct perf_evlist *evlist)
 	return 0;
 }
 
-int perf_evsel__store_ids(struct evsel *evsel, struct perf_evlist *evlist)
+int perf_evsel__store_ids(struct evsel *evsel, struct evlist *evlist)
 {
 	struct perf_cpu_map *cpus = evsel->cpus;
 	struct perf_thread_map *threads = evsel->threads;
tools/perf/util/evsel.h +2 -2
index 2c31c5e99524..3caabd8a4aa6 100644
@@ -102,7 +102,7 @@ struct bpf_object;
  */
 struct evsel {
 	struct list_head	node;
-	struct perf_evlist	*evlist;
+	struct evlist	*evlist;
 	struct perf_event_attr	attr;
 	char			*filter;
 	struct xyarray		*fd;
@@ -506,5 +506,5 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
 
 struct perf_env *perf_evsel__env(struct evsel *evsel);
 
-int perf_evsel__store_ids(struct evsel *evsel, struct perf_evlist *evlist);
+int perf_evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
 #endif /* __PERF_EVSEL_H */
tools/perf/util/header.c +43 -43

66 lines not on this page · raw message

tools/perf/util/header.h +8 -8
index 437d8617de27..3e48ae3c49b1 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.c +1 -1
index 3da49c479880..bb5437f549b6 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.h +5 -5
index 9bf247c638b8..83d5fc15429c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-bts.c +1 -1
index 8fd46d5f4b39..849a5b713b04 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-pt.c +5 -5
index f1595b86d7c7..c88e3d1ee9c7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/kvm-stat.h +2 -2
index 299edd32d3d4..a09c495f866b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/metricgroup.c +3 -3
index 14c423974d63..fdb0d1c5c5cf 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/mmap.c +1 -1
index 177c41fc9842..42a5971146ae 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/parse-events.c +5 -5
index dfde9cb31562..d341b11fb141 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/parse-events.h +3 -3
index 99e206598b60..48111b8fc232 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/python.c +8 -8
index beafbd469b0c..ed57b6b5ed91 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/record.c +4 -4
index ef8f686729fd..a550d78a0b4d 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/s390-sample-raw.c +1 -1
index 159a08220947..6c709647cd8e 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sample-raw.c +1 -1
index c21e1311fb0f..e84bbe0e441a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sample-raw.h +3 -3
index 95d445c87e93..afe1491a117e 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.c +12 -12
index e9d1cf8eb274..c191dc152175 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.h +2 -2
index 2b2427c4c0b9..79e97d17ea04 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sort.c +10 -10
index 133d3a45997f..d8e4392d6e18 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sort.h +3 -3
index a0f232151d6f..5e34676a98e8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-display.c +9 -9
index 8da4ddcb2e44..cdfceb5b4d72 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-shadow.c +2 -2
index 8c19f3149f34..d81bcab2e64c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.c +4 -4
index 7acb9a6730fe..efd934ec02c3 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.h +7 -7
index b64cf0177a91..95b4de7a9d51 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/tool.h +2 -2
index 5d880a6f0a34..7f95dd1d6883 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/top.h +2 -2
index 7e0f363c0658..2023e0bf6165 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.21.0

Part of the diff is not shown here. View the raw message.

#10 lore raw

[tip:perf/core] perf evlist: Rename struct perf_evlist to struct evlist

perf evlist: Rename struct perf_evlist to struct evlist
Commit-ID:  63503dba87acfab49280d3b05df6705a6f327e8a
Gitweb:     https://git.kernel.org/tip/63503dba87acfab49280d3b05df6705a6f327e8a
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:52 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf evlist: Rename struct perf_evlist to struct evlist

Rename struct perf_evlist to struct evlist, so we don't have a name clash when we add struct perf_evlist in libperf.

Committer notes:

Added fixes to build on arm64, from Jiri and from me (tools/perf/util/cs-etm.c)

---
 tools/perf/arch/arm/util/auxtrace.c          |   2 +-
 tools/perf/arch/arm/util/cs-etm.c            |   8 +-
 tools/perf/arch/arm64/util/arm-spe.c         |   6 +-
 tools/perf/arch/powerpc/util/kvm-stat.c      |   6 +-
 tools/perf/arch/s390/util/auxtrace.c         |   6 +-
 tools/perf/arch/x86/tests/intel-cqm.c        |   2 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c |   2 +-
 tools/perf/arch/x86/util/auxtrace.c          |   4 +-
 tools/perf/arch/x86/util/intel-bts.c         |   6 +-
 tools/perf/arch/x86/util/intel-pt.c          |  14 +-
 tools/perf/builtin-c2c.c                     |   4 +-
 tools/perf/builtin-diff.c                    |   8 +-
 tools/perf/builtin-ftrace.c                  |   2 +-
 tools/perf/builtin-inject.c                  |   8 +-
 tools/perf/builtin-kvm.c                     |   8 +-
 tools/perf/builtin-record.c                  |  14 +-
 tools/perf/builtin-report.c                  |   8 +-
 tools/perf/builtin-sched.c                   |   4 +-
 tools/perf/builtin-script.c                  |  10 +-
 tools/perf/builtin-stat.c                    |   2 +-
 tools/perf/builtin-top.c                     |  14 +-
 tools/perf/builtin-trace.c                   |  16 +--
 tools/perf/tests/backward-ring-buffer.c      |   6 +-
 tools/perf/tests/bpf.c                       |   2 +-
 tools/perf/tests/code-reading.c              |   8 +-
 tools/perf/tests/event-times.c               |  20 +--
 tools/perf/tests/event_update.c              |   2 +-
 tools/perf/tests/evsel-roundtrip-name.c      |   4 +-
 tools/perf/tests/hists_cumulate.c            |   2 +-
 tools/perf/tests/hists_filter.c              |   4 +-
 tools/perf/tests/hists_link.c                |   4 +-
 tools/perf/tests/hists_output.c              |   2 +-
 tools/perf/tests/keep-tracking.c             |   4 +-
 tools/perf/tests/mmap-basic.c                |   2 +-
 tools/perf/tests/openat-syscall-tp-fields.c  |   2 +-
 tools/perf/tests/parse-events.c              | 126 ++++++++---------
 tools/perf/tests/parse-no-sample-id-all.c    |   4 +-
 tools/perf/tests/perf-record.c               |   2 +-
 tools/perf/tests/sw-clock.c                  |   2 +-
 tools/perf/tests/switch-tracking.c           |  10 +-
 tools/perf/tests/task-exit.c                 |   2 +-
 tools/perf/tests/time-utils-test.c           |   2 +-
 tools/perf/ui/browsers/hists.c               |   6 +-
 tools/perf/ui/gtk/gtk.h                      |   4 +-
 tools/perf/ui/gtk/hists.c                    |   2 +-
 tools/perf/ui/hist.c                         |   2 +-
 tools/perf/util/auxtrace.c                   |  10 +-
 tools/perf/util/auxtrace.h                   |  24 ++--
 tools/perf/util/bpf-event.c                  |   2 +-
 tools/perf/util/bpf-event.h                  |   4 +-
 tools/perf/util/bpf-loader.c                 |  20 +--
 tools/perf/util/bpf-loader.h                 |  24 ++--
 tools/perf/util/cgroup.c                     |  10 +-
 tools/perf/util/cgroup.h                     |   6 +-
 tools/perf/util/cs-etm.c                     |   4 +-
 tools/perf/util/data-convert-bt.c            |   4 +-
 tools/perf/util/evlist.c                     | 194 +++++++++++++--------------
 tools/perf/util/evlist.h                     | 160 +++++++++++-----------
 tools/perf/util/evsel.c                      |   4 +-
 tools/perf/util/evsel.h                      |   4 +-
 tools/perf/util/header.c                     |  86 ++++++------
 tools/perf/util/header.h                     |  16 +--
 tools/perf/util/hist.c                       |   2 +-
 tools/perf/util/hist.h                       |  10 +-
 tools/perf/util/intel-bts.c                  |   2 +-
 tools/perf/util/intel-pt.c                   |  10 +-
 tools/perf/util/kvm-stat.h                   |   4 +-
 tools/perf/util/metricgroup.c                |   6 +-
 tools/perf/util/mmap.c                       |   2 +-
 tools/perf/util/parse-events.c               |  10 +-
 tools/perf/util/parse-events.h               |   6 +-
 tools/perf/util/python.c                     |  16 +--
 tools/perf/util/record.c                     |   8 +-
 tools/perf/util/s390-sample-raw.c            |   2 +-
 tools/perf/util/sample-raw.c                 |   2 +-
 tools/perf/util/sample-raw.h                 |   6 +-
 tools/perf/util/session.c                    |  24 ++--
 tools/perf/util/session.h                    |   4 +-
 tools/perf/util/sort.c                       |  20 +--
 tools/perf/util/sort.h                       |   6 +-
 tools/perf/util/stat-display.c               |  18 +--
 tools/perf/util/stat-shadow.c                |   4 +-
 tools/perf/util/stat.c                       |   8 +-
 tools/perf/util/stat.h                       |  14 +-
 tools/perf/util/tool.h                       |   4 +-
 tools/perf/util/top.h                        |   4 +-
 86 files changed, 571 insertions(+), 571 deletions(-)
tools/perf/arch/arm/util/auxtrace.c +1 -1
index fd17dccfcb0b..306a54185438 100644
@@ -50,7 +50,7 @@ static struct perf_pmu **find_all_arm_spe_pmus(int *nr_spes, int *err)
 }
 
 struct auxtrace_record
-*auxtrace_record__init(struct perf_evlist *evlist, int *err)
+*auxtrace_record__init(struct evlist *evlist, int *err)
 {
 	struct perf_pmu	*cs_etm_pmu;
 	struct evsel *evsel;
tools/perf/arch/arm/util/cs-etm.c +4 -4
index 476f845be5fe..91c64daa4487 100644
@@ -32,7 +32,7 @@
 struct cs_etm_recording {
 	struct auxtrace_record	itr;
 	struct perf_pmu		*cs_etm_pmu;
-	struct perf_evlist	*evlist;
+	struct evlist		*evlist;
 	int			wrapped_cnt;
 	bool			*wrapped;
 	bool			snapshot_mode;
@@ -245,7 +245,7 @@ static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
 }
 
 static int cs_etm_recording_options(struct auxtrace_record *itr,
-				    struct perf_evlist *evlist,
+				    struct evlist *evlist,
 				    struct record_opts *opts)
 {
 	int ret;
@@ -434,7 +434,7 @@ static u64 cs_etm_get_config(struct auxtrace_record *itr)
 	struct cs_etm_recording *ptr =
 			container_of(itr, struct cs_etm_recording, itr);
 	struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
-	struct perf_evlist *evlist = ptr->evlist;
+	struct evlist *evlist = ptr->evlist;
 	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
@@ -485,7 +485,7 @@ static u64 cs_etmv4_get_config(struct auxtrace_record *itr)
 
 static size_t
 cs_etm_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-		      struct perf_evlist *evlist __maybe_unused)
+		      struct evlist *evlist __maybe_unused)
 {
 	int i;
 	int etmv3 = 0, etmv4 = 0;
tools/perf/arch/arm64/util/arm-spe.c +3 -3
index 103bf20ae32a..cc29b995c751 100644
@@ -27,12 +27,12 @@
 struct arm_spe_recording {
 	struct auxtrace_record		itr;
 	struct perf_pmu			*arm_spe_pmu;
-	struct perf_evlist		*evlist;
+	struct evlist		*evlist;
 };
 
 static size_t
 arm_spe_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-		       struct perf_evlist *evlist __maybe_unused)
+		       struct evlist *evlist __maybe_unused)
 {
 	return ARM_SPE_AUXTRACE_PRIV_SIZE;
 }
@@ -59,7 +59,7 @@ static int arm_spe_info_fill(struct auxtrace_record *itr,
 }
 
 static int arm_spe_recording_options(struct auxtrace_record *itr,
-				     struct perf_evlist *evlist,
+				     struct evlist *evlist,
 				     struct record_opts *opts)
 {
 	struct arm_spe_recording *sper =
tools/perf/arch/powerpc/util/kvm-stat.c +3 -3
index 557c474f0a4b..28fc0bab370f 100644
@@ -106,7 +106,7 @@ const char * const kvm_skip_events[] = {
 };
 
 
-static int is_tracepoint_available(const char *str, struct perf_evlist *evlist)
+static int is_tracepoint_available(const char *str, struct evlist *evlist)
 {
 	struct parse_events_error err;
 	int ret;
@@ -119,7 +119,7 @@ static int is_tracepoint_available(const char *str, struct perf_evlist *evlist)
 }
 
 static int ppc__setup_book3s_hv(struct perf_kvm_stat *kvm,
-				struct perf_evlist *evlist)
+				struct evlist *evlist)
 {
 	const char **events_ptr;
 	int i, nr_tp = 0, err = -1;
@@ -146,7 +146,7 @@ static int ppc__setup_book3s_hv(struct perf_kvm_stat *kvm,
 /* Wrapper to setup kvm tracepoints */
 static int ppc__setup_kvm_tp(struct perf_kvm_stat *kvm)
 {
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
 	if (evlist == NULL)
 		return -ENOMEM;
tools/perf/arch/s390/util/auxtrace.c +3 -3
index aec819b945c5..833f60fa9c5a 100644
@@ -20,7 +20,7 @@ static void cpumsf_free(struct auxtrace_record *itr)
 }
 
 static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-				    struct perf_evlist *evlist __maybe_unused)
+				    struct evlist *evlist __maybe_unused)
 {
 	return 0;
 }
@@ -43,7 +43,7 @@ cpumsf_reference(struct auxtrace_record *itr __maybe_unused)
 
 static int
 cpumsf_recording_options(struct auxtrace_record *ar __maybe_unused,
-			 struct perf_evlist *evlist __maybe_unused,
+			 struct evlist *evlist __maybe_unused,
 			 struct record_opts *opts)
 {
 	unsigned int factor = 1;
@@ -82,7 +82,7 @@ cpumsf_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
  * auxtrace_record__init is called when perf record
  * check if the event really need auxtrace
  */
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
 					      int *err)
 {
 	struct auxtrace_record *aux;
tools/perf/arch/x86/tests/intel-cqm.c +1 -1
index b88ed71b2e3f..333b2f0d61e4 100644
@@ -40,7 +40,7 @@ static pid_t spawn(void)
  */
 int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	struct perf_event_attr pe;
 	int i, fd[2], flag, ret;
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
index 43fc7d426d93..d7092fc00e3b 100644
@@ -51,7 +51,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	int err = -1, ret, i;
 	const char *comm1, *comm2;
tools/perf/arch/x86/util/auxtrace.c +2 -2
index 02f192114448..6b3ad5c826fd 100644
@@ -16,7 +16,7 @@
 #include "../../util/evlist.h"
 
 static
-struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
 						    int *err)
 {
 	struct perf_pmu *intel_pt_pmu;
@@ -50,7 +50,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
 	return NULL;
 }
 
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
 					      int *err)
 {
 	char buffer[64];
tools/perf/arch/x86/util/intel-bts.c +3 -3
index 59685a19c3b9..c845531d383a 100644
@@ -35,7 +35,7 @@ struct intel_bts_snapshot_ref {
 struct intel_bts_recording {
 	struct auxtrace_record		itr;
 	struct perf_pmu			*intel_bts_pmu;
-	struct perf_evlist		*evlist;
+	struct evlist		*evlist;
 	bool				snapshot_mode;
 	size_t				snapshot_size;
 	int				snapshot_ref_cnt;
@@ -50,7 +50,7 @@ struct branch {
 
 static size_t
 intel_bts_info_priv_size(struct auxtrace_record *itr __maybe_unused,
-			 struct perf_evlist *evlist __maybe_unused)
+			 struct evlist *evlist __maybe_unused)
 {
 	return INTEL_BTS_AUXTRACE_PRIV_SIZE;
 }
@@ -99,7 +99,7 @@ static int intel_bts_info_fill(struct auxtrace_record *itr,
 }
 
 static int intel_bts_recording_options(struct auxtrace_record *itr,
-				       struct perf_evlist *evlist,
+				       struct evlist *evlist,
 				       struct record_opts *opts)
 {
 	struct intel_bts_recording *btsr =
tools/perf/arch/x86/util/intel-pt.c +7 -7
index b42df73fd7ff..e4dfe8c3d5c3 100644
@@ -44,7 +44,7 @@ struct intel_pt_recording {
 	struct auxtrace_record		itr;
 	struct perf_pmu			*intel_pt_pmu;
 	int				have_sched_switch;
-	struct perf_evlist		*evlist;
+	struct evlist		*evlist;
 	bool				snapshot_mode;
 	bool				snapshot_init_done;
 	size_t				snapshot_size;
@@ -110,7 +110,7 @@ static u64 intel_pt_masked_bits(u64 mask, u64 bits)
 }
 
 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
-				struct perf_evlist *evlist, u64 *res)
+				struct evlist *evlist, u64 *res)
 {
 	struct evsel *evsel;
 	u64 mask;
@@ -132,7 +132,7 @@ static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
 }
 
 static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu,
-				  struct perf_evlist *evlist)
+				  struct evlist *evlist)
 {
 	u64 val;
 	int err, topa_multiple_entries;
@@ -268,7 +268,7 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
 	return attr;
 }
 
-static const char *intel_pt_find_filter(struct perf_evlist *evlist,
+static const char *intel_pt_find_filter(struct evlist *evlist,
 					struct perf_pmu *intel_pt_pmu)
 {
 	struct evsel *evsel;
@@ -289,7 +289,7 @@ static size_t intel_pt_filter_bytes(const char *filter)
 }
 
 static size_t
-intel_pt_info_priv_size(struct auxtrace_record *itr, struct perf_evlist *evlist)
+intel_pt_info_priv_size(struct auxtrace_record *itr, struct evlist *evlist)
 {
 	struct intel_pt_recording *ptr =
 			container_of(itr, struct intel_pt_recording, itr);
@@ -398,7 +398,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr,
 	return 0;
 }
 
-static int intel_pt_track_switches(struct perf_evlist *evlist)
+static int intel_pt_track_switches(struct evlist *evlist)
 {
 	const char *sched_switch = "sched:sched_switch";
 	struct evsel *evsel;
@@ -549,7 +549,7 @@ static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
 }
 
 static int intel_pt_recording_options(struct auxtrace_record *itr,
-				      struct perf_evlist *evlist,
+				      struct evlist *evlist,
 				      struct record_opts *opts)
 {
 	struct intel_pt_recording *ptr =
tools/perf/builtin-c2c.c +2 -2
index d251a486f329..f0aae6e13a33 100644
@@ -2236,7 +2236,7 @@ static void print_pareto(FILE *out)
 
 static void print_c2c_info(FILE *out, struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 	bool first = true;
 
@@ -2567,7 +2567,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
 	return parse_callchain_report_opt(arg);
 }
 
-static int setup_callchain(struct perf_evlist *evlist)
+static int setup_callchain(struct evlist *evlist)
 {
 	u64 sample_type = perf_evlist__combined_sample_type(evlist);
 	enum perf_call_graph_mode mode = CALLCHAIN_NONE;
tools/perf/builtin-diff.c +4 -4
index c3b4b8196e00..e91c0d798181 100644
@@ -449,7 +449,7 @@ static struct perf_diff pdiff = {
 };
 
 static struct evsel *evsel_match(struct evsel *evsel,
-				      struct perf_evlist *evlist)
+				      struct evlist *evlist)
 {
 	struct evsel *e;
 
@@ -461,7 +461,7 @@ static struct evsel *evsel_match(struct evsel *evsel,
 	return NULL;
 }
 
-static void perf_evlist__collapse_resort(struct perf_evlist *evlist)
+static void perf_evlist__collapse_resort(struct evlist *evlist)
 {
 	struct evsel *evsel;
 
@@ -1009,7 +1009,7 @@ static void data__fprintf(void)
 
 static void data_process(void)
 {
-	struct perf_evlist *evlist_base = data__files[0].session->evlist;
+	struct evlist *evlist_base = data__files[0].session->evlist;
 	struct evsel *evsel_base;
 	bool first = true;
 
@@ -1019,7 +1019,7 @@ static void data_process(void)
 		int i;
 
 		data__for_each_file_new(i, d) {
-			struct perf_evlist *evlist = d->session->evlist;
+			struct evlist *evlist = d->session->evlist;
 			struct evsel *evsel;
 			struct hists *hists;
 
tools/perf/builtin-ftrace.c +1 -1
index 3e81e0b6628f..1263987c291a 100644
@@ -27,7 +27,7 @@
 #define DEFAULT_TRACER  "function_graph"
 
 struct perf_ftrace {
-	struct perf_evlist	*evlist;
+	struct evlist		*evlist;
 	struct target		target;
 	const char		*tracer;
 	struct list_head	filters;
tools/perf/builtin-inject.c +4 -4
index 646a1bf790fc..d2131fc863be 100644
@@ -96,7 +96,7 @@ static int perf_event__repipe_op2_synth(struct perf_session *session,
 
 static int perf_event__repipe_attr(struct perf_tool *tool,
 				   union perf_event *event,
-				   struct perf_evlist **pevlist)
+				   struct evlist **pevlist)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject,
 						  tool);
@@ -567,7 +567,7 @@ static int drop_sample(struct perf_tool *tool __maybe_unused,
 
 static void strip_init(struct perf_inject *inject)
 {
-	struct perf_evlist *evlist = inject->session->evlist;
+	struct evlist *evlist = inject->session->evlist;
 	struct evsel *evsel;
 
 	inject->tool.context_switch = perf_event__drop;
@@ -590,7 +590,7 @@ static bool has_tracking(struct evsel *evsel)
  * their selected event to exist, except if there is only 1 selected event left
  * and it has a compatible sample type.
  */
-static bool ok_to_remove(struct perf_evlist *evlist,
+static bool ok_to_remove(struct evlist *evlist,
 			 struct evsel *evsel_to_remove)
 {
 	struct evsel *evsel;
@@ -614,7 +614,7 @@ static bool ok_to_remove(struct perf_evlist *evlist,
 
 static void strip_fini(struct perf_inject *inject)
 {
-	struct perf_evlist *evlist = inject->session->evlist;
+	struct evlist *evlist = inject->session->evlist;
 	struct evsel *evsel, *tmp;
 
 	/* Remove non-synthesized evsels if possible */
tools/perf/builtin-kvm.c +4 -4
index cf8f27d05296..963dddc5853d 100644
@@ -743,7 +743,7 @@ static bool verify_vcpu(int vcpu)
 static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
 				   u64 *mmap_time)
 {
-	struct perf_evlist *evlist = kvm->evlist;
+	struct evlist *evlist = kvm->evlist;
 	union perf_event *event;
 	struct perf_mmap *md;
 	u64 timestamp;
@@ -1012,7 +1012,7 @@ static int kvm_live_open_events(struct perf_kvm_stat *kvm)
 {
 	int err, rc = -1;
 	struct evsel *pos;
-	struct perf_evlist *evlist = kvm->evlist;
+	struct evlist *evlist = kvm->evlist;
 	char sbuf[STRERR_BUFSIZE];
 
 	perf_evlist__config(evlist, &kvm->opts, NULL);
@@ -1283,9 +1283,9 @@ kvm_events_report(struct perf_kvm_stat *kvm, int argc, const char **argv)
 }
 
 #ifdef HAVE_TIMERFD_SUPPORT
-static struct perf_evlist *kvm_live_event_list(void)
+static struct evlist *kvm_live_event_list(void)
 {
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	char *tp, *name, *sys;
 	int err = -1;
 	const char * const *events_tp;
tools/perf/builtin-record.c +7 -7
index 7ba3a2c32e54..f08d1e6a1651 100644
@@ -73,7 +73,7 @@ struct record {
 	u64			bytes_written;
 	struct perf_data	data;
 	struct auxtrace_record	*itr;
-	struct perf_evlist	*evlist;
+	struct evlist	*evlist;
 	struct perf_session	*session;
 	int			realtime_prio;
 	bool			no_buildid;
@@ -346,7 +346,7 @@ static void record__aio_set_pos(int trace_fd, off_t pos)
 static void record__aio_mmap_read_sync(struct record *rec)
 {
 	int i;
-	struct perf_evlist *evlist = rec->evlist;
+	struct evlist *evlist = rec->evlist;
 	struct perf_mmap *maps = evlist->mmap;
 
 	if (!record__aio_enabled(rec))
@@ -672,7 +672,7 @@ static int record__auxtrace_init(struct record *rec __maybe_unused)
 #endif
 
 static int record__mmap_evlist(struct record *rec,
-			       struct perf_evlist *evlist)
+			       struct evlist *evlist)
 {
 	struct record_opts *opts = &rec->opts;
 	char msg[512];
@@ -714,7 +714,7 @@ static int record__open(struct record *rec)
 {
 	char msg[BUFSIZ];
 	struct evsel *pos;
-	struct perf_evlist *evlist = rec->evlist;
+	struct evlist *evlist = rec->evlist;
 	struct perf_session *session = rec->session;
 	struct record_opts *opts = &rec->opts;
 	int rc = 0;
@@ -904,7 +904,7 @@ static size_t zstd_compress(struct perf_session *session, void *dst, size_t dst_
 	return compressed;
 }
 
-static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evlist,
+static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist,
 				    bool overwrite, bool synch)
 {
 	u64 bytes_written = rec->bytes_written;
@@ -1165,7 +1165,7 @@ perf_event__synth_time_conv(const struct perf_event_mmap_page *pc __maybe_unused
 }
 
 static const struct perf_event_mmap_page *
-perf_evlist__pick_pc(struct perf_evlist *evlist)
+perf_evlist__pick_pc(struct evlist *evlist)
 {
 	if (evlist) {
 		if (evlist->mmap && evlist->mmap[0].base)
@@ -1313,7 +1313,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
 	struct perf_data *data = &rec->data;
 	struct perf_session *session;
 	bool disabled = false, draining = false;
-	struct perf_evlist *sb_evlist = NULL;
+	struct evlist *sb_evlist = NULL;
 	int fd;
 	float ratio = 0;
 
tools/perf/builtin-report.c +4 -4
index 96a506f0d4c1..e258e988c55b 100644
@@ -193,7 +193,7 @@ out:
 }
 
 static void setup_forced_leader(struct report *report,
-				struct perf_evlist *evlist)
+				struct evlist *evlist)
 {
 	if (report->group_set)
 		perf_evlist__force_leader(evlist);
@@ -459,7 +459,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	return ret + fprintf(fp, "\n#\n");
 }
 
-static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
+static int perf_evlist__tty_browse_hists(struct evlist *evlist,
 					 struct report *rep,
 					 const char *help)
 {
@@ -532,7 +532,7 @@ static void report__warn_kptr_restrict(const struct report *rep)
 
 static int report__gtk_browse_hists(struct report *rep, const char *help)
 {
-	int (*hist_browser)(struct perf_evlist *evlist, const char *help,
+	int (*hist_browser)(struct evlist *evlist, const char *help,
 			    struct hist_browser_timer *timer, float min_pcnt);
 
 	hist_browser = dlsym(perf_gtk_handle, "perf_evlist__gtk_browse_hists");
@@ -549,7 +549,7 @@ static int report__browse_hists(struct report *rep)
 {
 	int ret;
 	struct perf_session *session = rep->session;
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	const char *help = perf_tip(system_path(TIPDIR));
 
 	if (help == NULL) {
tools/perf/builtin-sched.c +2 -2
index 55779f496d27..c02ecb295f23 100644
@@ -2924,7 +2924,7 @@ static int perf_timehist__process_sample(struct perf_tool *tool,
 }
 
 static int timehist_check_attr(struct perf_sched *sched,
-			       struct perf_evlist *evlist)
+			       struct evlist *evlist)
 {
 	struct evsel *evsel;
 	struct evsel_runtime *er;
@@ -2963,7 +2963,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	};
 
 	struct perf_session *session;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	int err = -1;
 
 	/*
tools/perf/builtin-script.c +5 -5
index 4f9c8bb7620d..d741c0aa2750 100644
@@ -1636,7 +1636,7 @@ struct perf_script {
 	int			range_num;
 };
 
-static int perf_evlist__max_name_len(struct perf_evlist *evlist)
+static int perf_evlist__max_name_len(struct evlist *evlist)
 {
 	struct evsel *evsel;
 	int max = 0;
@@ -2018,10 +2018,10 @@ out_put:
 }
 
 static int process_attr(struct perf_tool *tool, union perf_event *event,
-			struct perf_evlist **pevlist)
+			struct evlist **pevlist)
 {
 	struct perf_script *scr = container_of(tool, struct perf_script, tool);
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct evsel *evsel, *pos;
 	int err;
 	static struct evsel_script *es;
@@ -2388,7 +2388,7 @@ static void sig_handler(int sig __maybe_unused)
 
 static void perf_script__fclose_per_event_dump(struct perf_script *script)
 {
-	struct perf_evlist *evlist = script->session->evlist;
+	struct evlist *evlist = script->session->evlist;
 	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
@@ -3256,7 +3256,7 @@ static int process_stat_config_event(struct perf_session *session __maybe_unused
 
 static int set_maps(struct perf_script *script)
 {
-	struct perf_evlist *evlist = script->session->evlist;
+	struct evlist *evlist = script->session->evlist;
 
 	if (!script->cpus || !script->threads)
 		return 0;
tools/perf/builtin-stat.c +1 -1
index e0ba97018ad7..4e61f8a1d22b 100644
@@ -130,7 +130,7 @@ static const char *smi_cost_attrs = {
 	"}"
 };
 
-static struct perf_evlist	*evsel_list;
+static struct evlist	*evsel_list;
 
 static struct target target = {
 	.uid	= UINT_MAX,
tools/perf/builtin-top.c +7 -7
index 2f22f313985e..c29fa1de854f 100644
@@ -839,7 +839,7 @@ static u64 last_timestamp;
 static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 {
 	struct record_opts *opts = &top->record_opts;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct perf_mmap *md;
 	union perf_event *event;
 
@@ -874,7 +874,7 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 static void perf_top__mmap_read(struct perf_top *top)
 {
 	bool overwrite = top->record_opts.overwrite;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	int i;
 
 	if (overwrite)
@@ -909,7 +909,7 @@ static void perf_top__mmap_read(struct perf_top *top)
 static int perf_top__overwrite_check(struct perf_top *top)
 {
 	struct record_opts *opts = &top->record_opts;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct perf_evsel_config_term *term;
 	struct list_head *config_terms;
 	struct evsel *evsel;
@@ -955,7 +955,7 @@ static int perf_top_overwrite_fallback(struct perf_top *top,
 				       struct evsel *evsel)
 {
 	struct record_opts *opts = &top->record_opts;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct evsel *counter;
 
 	if (!opts->overwrite)
@@ -976,7 +976,7 @@ static int perf_top__start_counters(struct perf_top *top)
 {
 	char msg[BUFSIZ];
 	struct evsel *counter;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct record_opts *opts = &top->record_opts;
 
 	if (perf_top__overwrite_check(top)) {
@@ -1100,7 +1100,7 @@ static int deliver_event(struct ordered_events *qe,
 			 struct ordered_event *qevent)
 {
 	struct perf_top *top = qe->data;
-	struct perf_evlist *evlist = top->evlist;
+	struct evlist *evlist = top->evlist;
 	struct perf_session *session = top->session;
 	union perf_event *event = qevent->event;
 	struct perf_sample sample;
@@ -1511,7 +1511,7 @@ int cmd_top(int argc, const char **argv)
 		    "Record namespaces events"),
 	OPT_END()
 	};
-	struct perf_evlist *sb_evlist = NULL;
+	struct evlist *sb_evlist = NULL;
 	const char * const top_usage[] = {
 		"perf top [<options>]",
 		NULL
tools/perf/builtin-trace.c +8 -8
index fde7eff811f9..f7e7daac3cbe 100644
@@ -96,7 +96,7 @@ struct trace {
 		struct bpf_map *map;
 	} dump;
 	struct record_opts	opts;
-	struct perf_evlist	*evlist;
+	struct evlist	*evlist;
 	struct machine		*host;
 	struct thread		*current;
 	struct bpf_object	*bpf_obj;
@@ -1388,7 +1388,7 @@ static char *trace__machine__resolve_kernel_addr(void *vmachine, unsigned long l
 	return machine__resolve_kernel_addr(vmachine, addrp, modp);
 }
 
-static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
+static int trace__symbols_init(struct trace *trace, struct evlist *evlist)
 {
 	int err = symbol__init(NULL);
 
@@ -2616,7 +2616,7 @@ static int trace__record(struct trace *trace, int argc, const char **argv)
 
 static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
 
-static bool perf_evlist__add_vfs_getname(struct perf_evlist *evlist)
+static bool perf_evlist__add_vfs_getname(struct evlist *evlist)
 {
 	bool found = false;
 	struct evsel *evsel, *tmp;
@@ -2699,7 +2699,7 @@ static void trace__handle_event(struct trace *trace, union perf_event *event, st
 static int trace__add_syscall_newtp(struct trace *trace)
 {
 	int ret = -1;
-	struct perf_evlist *evlist = trace->evlist;
+	struct evlist *evlist = trace->evlist;
 	struct evsel *sys_enter, *sys_exit;
 
 	sys_enter = perf_evsel__raw_syscall_newtp("sys_enter", trace__sys_enter);
@@ -3192,7 +3192,7 @@ static int trace__set_filter_pids(struct trace *trace)
 
 static int __trace__deliver_event(struct trace *trace, union perf_event *event)
 {
-	struct perf_evlist *evlist = trace->evlist;
+	struct evlist *evlist = trace->evlist;
 	struct perf_sample sample;
 	int err;
 
@@ -3250,7 +3250,7 @@ static int ordered_events__deliver_event(struct ordered_events *oe,
 
 static int trace__run(struct trace *trace, int argc, const char **argv)
 {
-	struct perf_evlist *evlist = trace->evlist;
+	struct evlist *evlist = trace->evlist;
 	struct evsel *evsel, *pgfault_maj = NULL, *pgfault_min = NULL;
 	int err = -1, i;
 	unsigned long before;
@@ -3843,7 +3843,7 @@ static int parse_pagefaults(const struct option *opt, const char *str,
 	return 0;
 }
 
-static void evlist__set_evsel_handler(struct perf_evlist *evlist, void *handler)
+static void evlist__set_evsel_handler(struct evlist *evlist, void *handler)
 {
 	struct evsel *evsel;
 
@@ -3851,7 +3851,7 @@ static void evlist__set_evsel_handler(struct perf_evlist *evlist, void *handler)
 		evsel->handler = handler;
 }
 
-static int evlist__set_syscall_tp_fields(struct perf_evlist *evlist)
+static int evlist__set_syscall_tp_fields(struct evlist *evlist)
 {
 	struct evsel *evsel;
 
tools/perf/tests/backward-ring-buffer.c +3 -3
index 921af318507c..3f9c931069b0 100644
@@ -25,7 +25,7 @@ static void testcase(void)
 	}
 }
 
-static int count_samples(struct perf_evlist *evlist, int *sample_count,
+static int count_samples(struct evlist *evlist, int *sample_count,
 			 int *comm_count)
 {
 	int i;
@@ -55,7 +55,7 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count,
 	return TEST_OK;
 }
 
-static int do_test(struct perf_evlist *evlist, int mmap_pages,
+static int do_test(struct evlist *evlist, int mmap_pages,
 		   int *sample_count, int *comm_count)
 {
 	int err;
@@ -82,7 +82,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
 {
 	int ret = TEST_SKIP, err, sample_count = 0, comm_count = 0;
 	char pid[16], sbuf[STRERR_BUFSIZE];
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct evsel *evsel __maybe_unused;
 	struct parse_events_error parse_error;
 	struct record_opts opts = {
tools/perf/tests/bpf.c +1 -1
index c9e4cdc4c9c8..95a15b51f95c 100644
@@ -118,7 +118,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
 
 	char pid[16];
 	char sbuf[STRERR_BUFSIZE];
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	int i, ret = TEST_FAIL, err = 0, count = 0;
 
 	struct parse_events_state parse_state;
tools/perf/tests/code-reading.c +4 -4
index 062d23bba2df..168deb9c563e 100644
@@ -362,7 +362,7 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
 }
 
 static int process_sample_event(struct machine *machine,
-				struct perf_evlist *evlist,
+				struct evlist *evlist,
 				union perf_event *event, struct state *state)
 {
 	struct perf_sample sample;
@@ -385,7 +385,7 @@ static int process_sample_event(struct machine *machine,
 	return ret;
 }
 
-static int process_event(struct machine *machine, struct perf_evlist *evlist,
+static int process_event(struct machine *machine, struct evlist *evlist,
 			 union perf_event *event, struct state *state)
 {
 	if (event->header.type == PERF_RECORD_SAMPLE)
@@ -408,7 +408,7 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist,
 	return 0;
 }
 
-static int process_events(struct machine *machine, struct perf_evlist *evlist,
+static int process_events(struct machine *machine, struct evlist *evlist,
 			  struct state *state)
 {
 	union perf_event *event;
@@ -554,7 +554,7 @@ static int do_test_code_reading(bool try_kcore)
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	int err = -1, ret;
 	pid_t pid;
tools/perf/tests/event-times.c +10 -10
index 45fe674233d7..c3545a6efcbc 100644
@@ -12,7 +12,7 @@
 #include "thread_map.h"
 #include "target.h"
 
-static int attach__enable_on_exec(struct perf_evlist *evlist)
+static int attach__enable_on_exec(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct target target = {
@@ -48,13 +48,13 @@ static int attach__enable_on_exec(struct perf_evlist *evlist)
 	return perf_evlist__start_workload(evlist) == 1 ? TEST_OK : TEST_FAIL;
 }
 
-static int detach__enable_on_exec(struct perf_evlist *evlist)
+static int detach__enable_on_exec(struct evlist *evlist)
 {
 	waitpid(evlist->workload.pid, NULL, 0);
 	return 0;
 }
 
-static int attach__current_disabled(struct perf_evlist *evlist)
+static int attach__current_disabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
@@ -80,7 +80,7 @@ static int attach__current_disabled(struct perf_evlist *evlist)
 	return perf_evsel__enable(evsel) == 0 ? TEST_OK : TEST_FAIL;
 }
 
-static int attach__current_enabled(struct perf_evlist *evlist)
+static int attach__current_enabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_thread_map *threads;
@@ -100,14 +100,14 @@ static int attach__current_enabled(struct perf_evlist *evlist)
 	return err == 0 ? TEST_OK : TEST_FAIL;
 }
 
-static int detach__disable(struct perf_evlist *evlist)
+static int detach__disable(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 
 	return perf_evsel__enable(evsel);
 }
 
-static int attach__cpu_disabled(struct perf_evlist *evlist)
+static int attach__cpu_disabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
@@ -136,7 +136,7 @@ static int attach__cpu_disabled(struct perf_evlist *evlist)
 	return perf_evsel__enable(evsel);
 }
 
-static int attach__cpu_enabled(struct perf_evlist *evlist)
+static int attach__cpu_enabled(struct evlist *evlist)
 {
 	struct evsel *evsel = perf_evlist__last(evlist);
 	struct perf_cpu_map *cpus;
@@ -158,11 +158,11 @@ static int attach__cpu_enabled(struct perf_evlist *evlist)
 	return err ? TEST_FAIL : TEST_OK;
 }
 
-static int test_times(int (attach)(struct perf_evlist *),
-		      int (detach)(struct perf_evlist *))
+static int test_times(int (attach)(struct evlist *),
+		      int (detach)(struct evlist *))
 {
 	struct perf_counts_values count;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel;
 	int err = -1, i;
 
tools/perf/tests/event_update.c +1 -1
index 0e5a2e8195e4..eb0dd359762d 100644
@@ -79,7 +79,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,
 
 int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unused)
 {
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct evsel *evsel;
 	struct event_name tmp;
 
tools/perf/tests/evsel-roundtrip-name.c +2 -2
index bb38489eda1e..6cc408b23026 100644
@@ -12,7 +12,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 	char name[128];
 	int type, op, err = 0, ret = 0, i, idx;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
                 return -ENOMEM;
@@ -68,7 +68,7 @@ static int __perf_evsel__name_array_test(const char *names[], int nr_names)
 {
 	int i, err;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
         if (evlist == NULL)
                 return -ENOMEM;
tools/perf/tests/hists_cumulate.c +1 -1
index b62bf7c3bea2..d7a6b97683d6 100644
@@ -695,7 +695,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
 	struct machines machines;
 	struct machine *machine;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
 		test1,
tools/perf/tests/hists_filter.c +2 -2
index 3e679bb8da7f..9f0d6af839e9 100644
@@ -47,7 +47,7 @@ static struct sample fake_samples[] = {
 	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 3 },
 };
 
-static int add_hist_entries(struct perf_evlist *evlist,
+static int add_hist_entries(struct evlist *evlist,
 			    struct machine *machine)
 {
 	struct evsel *evsel;
@@ -109,7 +109,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
 	struct machines machines;
 	struct machine *machine;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
 	TEST_ASSERT_VAL("No memory", evlist);
 
tools/perf/tests/hists_link.c +2 -2
index 078ee9876980..6ab27dd3bf3f 100644
@@ -62,7 +62,7 @@ static struct sample fake_samples[][5] = {
 	},
 };
 
-static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
+static int add_hist_entries(struct evlist *evlist, struct machine *machine)
 {
 	struct evsel *evsel;
 	struct addr_location al;
@@ -272,7 +272,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
 	struct machines machines;
 	struct machine *machine = NULL;
 	struct evsel *evsel, *first;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 
 	if (evlist == NULL)
                 return -ENOMEM;
tools/perf/tests/hists_output.c +1 -1
index 5cd4b1baa9d1..cd36e51cdf3b 100644
@@ -581,7 +581,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
 	struct machines machines;
 	struct machine *machine;
 	struct evsel *evsel;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 	size_t i;
 	test_fn_t testcases[] = {
 		test1,
tools/perf/tests/keep-tracking.c +2 -2
index 8ada3e63f1ba..e0779f2a340c 100644
@@ -24,7 +24,7 @@
 	}					\
 }
 
-static int find_comm(struct perf_evlist *evlist, const char *comm)
+static int find_comm(struct evlist *evlist, const char *comm)
 {
 	union perf_event *event;
 	struct perf_mmap *md;
@@ -67,7 +67,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel = NULL;
 	int found, err = -1;
 	const char *comm;
tools/perf/tests/mmap-basic.c +1 -1
index 76ee42eb1355..749b580e9a92 100644
@@ -29,7 +29,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 	union perf_event *event;
 	struct perf_thread_map *threads;
 	struct perf_cpu_map *cpus;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	cpu_set_t cpu_set;
 	const char *syscall_names[] = { "getsid", "getppid", "getpgid", };
 	pid_t (*syscalls[])(void) = { (void *)getsid, getppid, (void*)getpgid };
tools/perf/tests/openat-syscall-tp-fields.c +1 -1
index 2e467448e220..69bf0ec2fe5f 100644
@@ -32,7 +32,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
 	};
 	const char *filename = "/etc/passwd";
 	int flags = O_RDONLY | O_DIRECTORY;
-	struct perf_evlist *evlist = perf_evlist__new();
+	struct evlist *evlist = perf_evlist__new();
 	struct evsel *evsel;
 	int err = -1, i, nr_events = 0, nr_polls = 0;
 	char sbuf[STRERR_BUFSIZE];
tools/perf/tests/parse-events.c +63 -63

504 lines not on this page · raw message

tools/perf/tests/parse-no-sample-id-all.c +2 -2
index 2196d1497c0c..fc0213246aaf 100644
@@ -11,7 +11,7 @@
 #include "util.h"
 #include "debug.h"
 
-static int process_event(struct perf_evlist **pevlist, union perf_event *event)
+static int process_event(struct evlist **pevlist, union perf_event *event)
 {
 	struct perf_sample sample;
 
@@ -39,7 +39,7 @@ static int process_event(struct perf_evlist **pevlist, union perf_event *event)
 
 static int process_events(union perf_event **events, size_t count)
 {
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	int err = 0;
 	size_t i;
 
tools/perf/tests/perf-record.c +1 -1
index 7e576c2db941..99b2d26881f9 100644
@@ -50,7 +50,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
 	};
 	cpu_set_t cpu_mask;
 	size_t cpu_mask_size = sizeof(cpu_mask);
-	struct perf_evlist *evlist = perf_evlist__new_dummy();
+	struct evlist *evlist = perf_evlist__new_dummy();
 	struct evsel *evsel;
 	struct perf_sample sample;
 	const char *cmd = "sleep";
tools/perf/tests/sw-clock.c +1 -1
index 620a99aad1e3..69b997eeb639 100644
@@ -28,7 +28,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 	char sbuf[STRERR_BUFSIZE];
 	union perf_event *event;
 	struct evsel *evsel;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct perf_event_attr attr = {
 		.type = PERF_TYPE_SOFTWARE,
 		.config = clock_id,
tools/perf/tests/switch-tracking.c +5 -5
index a946b9fa60dd..3e26ea36ec29 100644
@@ -113,7 +113,7 @@ static int check_cpu(struct switch_tracking *switch_tracking, int cpu)
 	return 0;
 }
 
-static int process_sample_event(struct perf_evlist *evlist,
+static int process_sample_event(struct evlist *evlist,
 				union perf_event *event,
 				struct switch_tracking *switch_tracking)
 {
@@ -163,7 +163,7 @@ static int process_sample_event(struct perf_evlist *evlist,
 	return 0;
 }
 
-static int process_event(struct perf_evlist *evlist, union perf_event *event,
+static int process_event(struct evlist *evlist, union perf_event *event,
 			 struct switch_tracking *switch_tracking)
 {
 	if (event->header.type == PERF_RECORD_SAMPLE)
@@ -203,7 +203,7 @@ struct event_node {
 	u64 event_time;
 };
 
-static int add_event(struct perf_evlist *evlist, struct list_head *events,
+static int add_event(struct evlist *evlist, struct list_head *events,
 		     union perf_event *event)
 {
 	struct perf_sample sample;
@@ -252,7 +252,7 @@ static int compar(const void *a, const void *b)
 	return cmp;
 }
 
-static int process_events(struct perf_evlist *evlist,
+static int process_events(struct evlist *evlist,
 			  struct switch_tracking *switch_tracking)
 {
 	union perf_event *event;
@@ -329,7 +329,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
 	};
 	struct perf_thread_map *threads = NULL;
 	struct perf_cpu_map *cpus = NULL;
-	struct perf_evlist *evlist = NULL;
+	struct evlist *evlist = NULL;
 	struct evsel *evsel, *cpu_clocks_evsel, *cycles_evsel;
 	struct evsel *switch_evsel, *tracking_evsel;
 	const char *comm;
tools/perf/tests/task-exit.c +1 -1
index e6fb4b8d8bc2..5c2cdb0ccb96 100644
@@ -38,7 +38,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
 	int err = -1;
 	union perf_event *event;
 	struct evsel *evsel;
-	struct perf_evlist *evlist;
+	struct evlist *evlist;
 	struct target target = {
 		.uid		= UINT_MAX,
 		.uses_mmap	= true,
tools/perf/tests/time-utils-test.c +1 -1
index 4f53006233a1..fe57ca3b6e54 100644
@@ -69,7 +69,7 @@ struct test_data {
 
 static bool test__perf_time__parse_for_ranges(struct test_data *d)
 {
-	struct perf_evlist evlist = {
+	struct evlist evlist = {
 		.first_sample_time = d->first,
 		.last_sample_time = d->last,
 	};
tools/perf/ui/browsers/hists.c +3 -3
index 9bc818621eb6..b83258bece05 100644
@@ -3262,7 +3262,7 @@ static int perf_evsel_menu__run(struct evsel_menu *menu,
 				struct hist_browser_timer *hbt,
 				bool warn_lost_event)
 {
-	struct perf_evlist *evlist = menu->b.priv;
+	struct evlist *evlist = menu->b.priv;
 	struct evsel *pos;
 	const char *title = "Available samples";
 	int delay_secs = hbt ? hbt->refresh : 0;
@@ -3359,7 +3359,7 @@ static bool filter_group_entries(struct ui_browser *browser __maybe_unused,
 	return false;
 }
 
-static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
+static int __perf_evlist__tui_browse_hists(struct evlist *evlist,
 					   int nr_entries, const char *help,
 					   struct hist_browser_timer *hbt,
 					   float min_pcnt,
@@ -3397,7 +3397,7 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
 				    hbt, warn_lost_event);
 }
 
-int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
+int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
 				  struct hist_browser_timer *hbt,
 				  float min_pcnt,
 				  struct perf_env *env,
tools/perf/ui/gtk/gtk.h +2 -2
index e2f5fbef3c9a..a9563932fa04 100644
@@ -53,11 +53,11 @@ static inline GtkWidget *perf_gtk__setup_info_bar(void)
 #endif
 
 struct evsel;
-struct perf_evlist;
+struct evlist;
 struct hist_entry;
 struct hist_browser_timer;
 
-int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
+int perf_evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
 				  struct hist_browser_timer *hbt,
 				  float min_pcnt);
 int hist_entry__gtk_annotate(struct hist_entry *he,
tools/perf/ui/gtk/hists.c +1 -1
index d5c9fe230632..1b181d8ea953 100644
@@ -590,7 +590,7 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists,
 	gtk_container_add(GTK_CONTAINER(window), view);
 }
 
-int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist,
+int perf_evlist__gtk_browse_hists(struct evlist *evlist,
 				  const char *help,
 				  struct hist_browser_timer *hbt __maybe_unused,
 				  float min_pcnt)
tools/perf/ui/hist.c +1 -1
index 214af526901b..8c7fb11edc60 100644
@@ -795,7 +795,7 @@ static int add_hierarchy_fmt(struct hists *hists, struct perf_hpp_fmt *fmt)
 }
 
 int perf_hpp__setup_hists_formats(struct perf_hpp_list *list,
-				  struct perf_evlist *evlist)
+				  struct evlist *evlist)
 {
 	struct evsel *evsel;
 	struct perf_hpp_fmt *fmt;
tools/perf/util/auxtrace.c +5 -5
index 98b151bc9a36..9ec2841ddec4 100644
@@ -124,7 +124,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
 }
 
 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
-				   struct perf_evlist *evlist, int idx,
+				   struct evlist *evlist, int idx,
 				   bool per_cpu)
 {
 	mp->idx = idx;
@@ -503,7 +503,7 @@ void auxtrace_heap__pop(struct auxtrace_heap *heap)
 }
 
 size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
-				       struct perf_evlist *evlist)
+				       struct evlist *evlist)
 {
 	if (itr)
 		return itr->info_priv_size(itr, evlist);
@@ -556,7 +556,7 @@ int auxtrace_record__find_snapshot(struct auxtrace_record *itr, int idx,
 }
 
 int auxtrace_record__options(struct auxtrace_record *itr,
-			     struct perf_evlist *evlist,
+			     struct evlist *evlist,
 			     struct record_opts *opts)
 {
 	if (itr)
@@ -585,7 +585,7 @@ int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
 }
 
 struct auxtrace_record *__weak
-auxtrace_record__init(struct perf_evlist *evlist __maybe_unused, int *err)
+auxtrace_record__init(struct evlist *evlist __maybe_unused, int *err)
 {
 	*err = 0;
 	return NULL;
@@ -2160,7 +2160,7 @@ static int perf_evsel__nr_addr_filter(struct evsel *evsel)
 	return nr_addr_filters;
 }
 
-int auxtrace_parse_filters(struct perf_evlist *evlist)
+int auxtrace_parse_filters(struct evlist *evlist)
 {
 	struct evsel *evsel;
 	char *filter;
tools/perf/util/auxtrace.h +12 -12
index e9b4c5edf78b..17eb04a1da4d 100644
@@ -23,7 +23,7 @@
 
 union perf_event;
 struct perf_session;
-struct perf_evlist;
+struct evlist;
 struct perf_tool;
 struct perf_mmap;
 struct option;
@@ -309,10 +309,10 @@ struct auxtrace_mmap_params {
  */
 struct auxtrace_record {
 	int (*recording_options)(struct auxtrace_record *itr,
-				 struct perf_evlist *evlist,
+				 struct evlist *evlist,
 				 struct record_opts *opts);
 	size_t (*info_priv_size)(struct auxtrace_record *itr,
-				 struct perf_evlist *evlist);
+				 struct evlist *evlist);
 	int (*info_fill)(struct auxtrace_record *itr,
 			 struct perf_session *session,
 			 struct auxtrace_info_event *auxtrace_info,
@@ -432,7 +432,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
 				unsigned int auxtrace_pages,
 				bool auxtrace_overwrite);
 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
-				   struct perf_evlist *evlist, int idx,
+				   struct evlist *evlist, int idx,
 				   bool per_cpu);
 
 typedef int (*process_auxtrace_t)(struct perf_tool *tool,
@@ -482,17 +482,17 @@ int auxtrace_cache__add(struct auxtrace_cache *c, u32 key,
 			struct auxtrace_cache_entry *entry);
 void *auxtrace_cache__lookup(struct auxtrace_cache *c, u32 key);
 
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
 					      int *err);
 
 int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
 				    struct record_opts *opts,
 				    const char *str);
 int auxtrace_record__options(struct auxtrace_record *itr,
-			     struct perf_evlist *evlist,
+			     struct evlist *evlist,
 			     struct record_opts *opts);
 size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
-				       struct perf_evlist *evlist);
+				       struct evlist *evlist);
 int auxtrace_record__info_fill(struct auxtrace_record *itr,
 			       struct perf_session *session,
 			       struct auxtrace_info_event *auxtrace_info,
@@ -540,7 +540,7 @@ void addr_filters__init(struct addr_filters *filts);
 void addr_filters__exit(struct addr_filters *filts);
 int addr_filters__parse_bare_filter(struct addr_filters *filts,
 				    const char *filter);
-int auxtrace_parse_filters(struct perf_evlist *evlist);
+int auxtrace_parse_filters(struct evlist *evlist);
 
 static inline int auxtrace__process_event(struct perf_session *session,
 					  union perf_event *event,
@@ -613,7 +613,7 @@ void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts)
 #else
 
 static inline struct auxtrace_record *
-auxtrace_record__init(struct perf_evlist *evlist __maybe_unused,
+auxtrace_record__init(struct evlist *evlist __maybe_unused,
 		      int *err)
 {
 	*err = 0;
@@ -636,7 +636,7 @@ perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr __maybe_unused,
 
 static inline
 int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused,
-			     struct perf_evlist *evlist __maybe_unused,
+			     struct evlist *evlist __maybe_unused,
 			     struct record_opts *opts __maybe_unused)
 {
 	return 0;
@@ -733,7 +733,7 @@ void auxtrace_index__free(struct list_head *head __maybe_unused)
 }
 
 static inline
-int auxtrace_parse_filters(struct perf_evlist *evlist __maybe_unused)
+int auxtrace_parse_filters(struct evlist *evlist __maybe_unused)
 {
 	return 0;
 }
@@ -747,7 +747,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
 				unsigned int auxtrace_pages,
 				bool auxtrace_overwrite);
 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
-				   struct perf_evlist *evlist, int idx,
+				   struct evlist *evlist, int idx,
 				   bool per_cpu);
 
 #define ITRACE_HELP ""
tools/perf/util/bpf-event.c +1 -1
index 2a4a0da35632..5a5dcc6d8f85 100644
@@ -418,7 +418,7 @@ static int bpf_event__sb_cb(union perf_event *event, void *data)
 	return 0;
 }
 
-int bpf_event__add_sb_event(struct perf_evlist **evlist,
+int bpf_event__add_sb_event(struct evlist **evlist,
 			    struct perf_env *env)
 {
 	struct perf_event_attr attr = {
tools/perf/util/bpf-event.h +2 -2
index 04c33b3bfe28..26ab9239f986 100644
@@ -37,7 +37,7 @@ int perf_event__synthesize_bpf_events(struct perf_session *session,
 				      perf_event__handler_t process,
 				      struct machine *machine,
 				      struct record_opts *opts);
-int bpf_event__add_sb_event(struct perf_evlist **evlist,
+int bpf_event__add_sb_event(struct evlist **evlist,
 				 struct perf_env *env);
 void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info,
 				    struct perf_env *env,
@@ -58,7 +58,7 @@ static inline int perf_event__synthesize_bpf_events(struct perf_session *session
 	return 0;
 }
 
-static inline int bpf_event__add_sb_event(struct perf_evlist **evlist __maybe_unused,
+static inline int bpf_event__add_sb_event(struct evlist **evlist __maybe_unused,
 					  struct perf_env *env __maybe_unused)
 {
 	return 0;
tools/perf/util/bpf-loader.c +10 -10
index 594ea279e25b..b0696726ab76 100644
@@ -1043,7 +1043,7 @@ __bpf_map__config_value(struct bpf_map *map,
 static int
 bpf_map__config_value(struct bpf_map *map,
 		      struct parse_events_term *term,
-		      struct perf_evlist *evlist __maybe_unused)
+		      struct evlist *evlist __maybe_unused)
 {
 	if (!term->err_val) {
 		pr_debug("Config value not set\n");
@@ -1061,7 +1061,7 @@ bpf_map__config_value(struct bpf_map *map,
 static int
 __bpf_map__config_event(struct bpf_map *map,
 			struct parse_events_term *term,
-			struct perf_evlist *evlist)
+			struct evlist *evlist)
 {
 	struct evsel *evsel;
 	const struct bpf_map_def *def;
@@ -1103,7 +1103,7 @@ __bpf_map__config_event(struct bpf_map *map,
 static int
 bpf_map__config_event(struct bpf_map *map,
 		      struct parse_events_term *term,
-		      struct perf_evlist *evlist)
+		      struct evlist *evlist)
 {
 	if (!term->err_val) {
 		pr_debug("Config value not set\n");
@@ -1121,7 +1121,7 @@ bpf_map__config_event(struct bpf_map *map,
 struct bpf_obj_config__map_func {
 	const char *config_opt;
 	int (*config_func)(struct bpf_map *, struct parse_events_term *,
-			   struct perf_evlist *);
+			   struct evlist *);
 };
 
 struct bpf_obj_config__map_func bpf_obj_config__map_funcs[] = {
@@ -1169,7 +1169,7 @@ config_map_indices_range_check(struct parse_events_term *term,
 static int
 bpf__obj_config_map(struct bpf_object *obj,
 		    struct parse_events_term *term,
-		    struct perf_evlist *evlist,
+		    struct evlist *evlist,
 		    int *key_scan_pos)
 {
 	/* key is "map:<mapname>.<config opt>" */
@@ -1228,7 +1228,7 @@ out:
 
 int bpf__config_obj(struct bpf_object *obj,
 		    struct parse_events_term *term,
-		    struct perf_evlist *evlist,
+		    struct evlist *evlist,
 		    int *error_pos)
 {
 	int key_scan_pos = 0;
@@ -1523,7 +1523,7 @@ int bpf__apply_obj_config(void)
 			(strcmp(name, 			\
 				bpf_map__name(pos)) == 0))
 
-struct evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *name)
+struct evsel *bpf__setup_output_event(struct evlist *evlist, const char *name)
 {
 	struct bpf_map_priv *tmpl_priv = NULL;
 	struct bpf_object *obj, *tmp;
@@ -1600,7 +1600,7 @@ struct evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *na
 	return evsel;
 }
 
-int bpf__setup_stdout(struct perf_evlist *evlist)
+int bpf__setup_stdout(struct evlist *evlist)
 {
 	struct evsel *evsel = bpf__setup_output_event(evlist, "__bpf_stdout__");
 	return PTR_ERR_OR_ZERO(evsel);
@@ -1756,7 +1756,7 @@ int bpf__strerror_load(struct bpf_object *obj,
 
 int bpf__strerror_config_obj(struct bpf_object *obj __maybe_unused,
 			     struct parse_events_term *term __maybe_unused,
-			     struct perf_evlist *evlist __maybe_unused,
+			     struct evlist *evlist __maybe_unused,
 			     int *error_pos __maybe_unused, int err,
 			     char *buf, size_t size)
 {
@@ -1780,7 +1780,7 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size)
 	return 0;
 }
 
-int bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
+int bpf__strerror_setup_output_event(struct evlist *evlist __maybe_unused,
 				     int err, char *buf, size_t size)
 {
 	bpf__strerror_head(err, buf, size);
tools/perf/util/bpf-loader.h +12 -12
index e2048c978a24..25251d63164c 100644
@@ -40,7 +40,7 @@ enum bpf_loader_errno {
 };
 
 struct evsel;
-struct perf_evlist;
+struct evlist;
 struct bpf_object;
 struct parse_events_term;
 #define PERF_BPF_PROBE_GROUP "perf_bpf_probe"
@@ -70,18 +70,18 @@ int bpf__foreach_event(struct bpf_object *obj,
 		       bpf_prog_iter_callback_t func, void *arg);
 
 int bpf__config_obj(struct bpf_object *obj, struct parse_events_term *term,
-		    struct perf_evlist *evlist, int *error_pos);
+		    struct evlist *evlist, int *error_pos);
 int bpf__strerror_config_obj(struct bpf_object *obj,
 			     struct parse_events_term *term,
-			     struct perf_evlist *evlist,
+			     struct evlist *evlist,
 			     int *error_pos, int err, char *buf,
 			     size_t size);
 int bpf__apply_obj_config(void);
 int bpf__strerror_apply_obj_config(int err, char *buf, size_t size);
 
-int bpf__setup_stdout(struct perf_evlist *evlist);
-struct evsel *bpf__setup_output_event(struct perf_evlist *evlist, const char *name);
-int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size);
+int bpf__setup_stdout(struct evlist *evlist);
+struct evsel *bpf__setup_output_event(struct evlist *evlist, const char *name);
+int bpf__strerror_setup_output_event(struct evlist *evlist, int err, char *buf, size_t size);
 #else
 #include <errno.h>
 #include <string.h>
@@ -119,7 +119,7 @@ bpf__foreach_event(struct bpf_object *obj __maybe_unused,
 static inline int
 bpf__config_obj(struct bpf_object *obj __maybe_unused,
 		struct parse_events_term *term __maybe_unused,
-		struct perf_evlist *evlist __maybe_unused,
+		struct evlist *evlist __maybe_unused,
 		int *error_pos __maybe_unused)
 {
 	return 0;
@@ -132,13 +132,13 @@ bpf__apply_obj_config(void)
 }
 
 static inline int
-bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused)
+bpf__setup_stdout(struct evlist *evlist __maybe_unused)
 {
 	return 0;
 }
 
 static inline struct evsel *
-bpf__setup_output_event(struct perf_evlist *evlist __maybe_unused, const char *name __maybe_unused)
+bpf__setup_output_event(struct evlist *evlist __maybe_unused, const char *name __maybe_unused)
 {
 	return NULL;
 }
@@ -182,7 +182,7 @@ static inline int bpf__strerror_load(struct bpf_object *obj __maybe_unused,
 static inline int
 bpf__strerror_config_obj(struct bpf_object *obj __maybe_unused,
 			 struct parse_events_term *term __maybe_unused,
-			 struct perf_evlist *evlist __maybe_unused,
+			 struct evlist *evlist __maybe_unused,
 			 int *error_pos __maybe_unused,
 			 int err __maybe_unused,
 			 char *buf, size_t size)
@@ -198,7 +198,7 @@ bpf__strerror_apply_obj_config(int err __maybe_unused,
 }
 
 static inline int
-bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
+bpf__strerror_setup_output_event(struct evlist *evlist __maybe_unused,
 				 int err __maybe_unused, char *buf, size_t size)
 {
 	return __bpf_strerror(buf, size);
@@ -206,7 +206,7 @@ bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
 
 #endif
 
-static inline int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, char *buf, size_t size)
+static inline int bpf__strerror_setup_stdout(struct evlist *evlist, int err, char *buf, size_t size)
 {
 	return bpf__strerror_setup_output_event(evlist, err, buf, size);
 }
tools/perf/util/cgroup.c +5 -5
index 4f5c326a9477..deb87ecd3671 100644
@@ -90,7 +90,7 @@ static int open_cgroup(const char *name)
 	return fd;
 }
 
-static struct cgroup *evlist__find_cgroup(struct perf_evlist *evlist, const char *str)
+static struct cgroup *evlist__find_cgroup(struct evlist *evlist, const char *str)
 {
 	struct evsel *counter;
 	/*
@@ -130,14 +130,14 @@ out_err:
 	return NULL;
 }
 
-struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, const char *name)
+struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name)
 {
 	struct cgroup *cgroup = evlist__find_cgroup(evlist, name);
 
 	return cgroup ?: cgroup__new(name);
 }
 
-static int add_cgroup(struct perf_evlist *evlist, const char *str)
+static int add_cgroup(struct evlist *evlist, const char *str)
 {
 	struct evsel *counter;
 	struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str);
@@ -190,7 +190,7 @@ static void evsel__set_default_cgroup(struct evsel *evsel, struct cgroup *cgroup
 		evsel->cgrp = cgroup__get(cgroup);
 }
 
-void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgroup)
+void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup)
 {
 	struct evsel *evsel;
 
@@ -201,7 +201,7 @@ void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgrou
 int parse_cgroups(const struct option *opt, const char *str,
 		  int unset __maybe_unused)
 {
-	struct perf_evlist *evlist = *(struct perf_evlist **)opt->value;
+	struct evlist *evlist = *(struct evlist **)opt->value;
 	struct evsel *counter;
 	struct cgroup *cgrp = NULL;
 	const char *p, *e, *eos = str + strlen(str);
tools/perf/util/cgroup.h +3 -3
index f033a80c1b14..2ec11f01090d 100644
@@ -18,11 +18,11 @@ extern int nr_cgroups; /* number of explicit cgroups defined */
 struct cgroup *cgroup__get(struct cgroup *cgroup);
 void cgroup__put(struct cgroup *cgroup);
 
-struct perf_evlist;
+struct evlist;
 
-struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, const char *name);
+struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name);
 
-void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgroup);
+void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup);
 
 int parse_cgroups(const struct option *opt, const char *str, int unset);
 
tools/perf/util/cs-etm.c +2 -2
index 5a9fcb60ec88..c1df366f4519 100644
@@ -1222,7 +1222,7 @@ static int cs_etm__synth_event(struct perf_session *session,
 static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
 				struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 	struct perf_event_attr attr;
 	bool found = false;
@@ -2295,7 +2295,7 @@ static int cs_etm__process_auxtrace_event(struct perf_session *session,
 static bool cs_etm__is_timeless_decoding(struct cs_etm_auxtrace *etm)
 {
 	struct evsel *evsel;
-	struct perf_evlist *evlist = etm->session->evlist;
+	struct evlist *evlist = etm->session->evlist;
 	bool timeless_decoding = true;
 
 	/*
tools/perf/util/data-convert-bt.c +2 -2
index 042ee5b6f9f1..083101ae7b77 100644
@@ -1201,7 +1201,7 @@ err:
 
 static int setup_events(struct ctf_writer *cw, struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 	int ret;
 
@@ -1308,7 +1308,7 @@ static int setup_non_sample_events(struct ctf_writer *cw,
 
 static void cleanup_events(struct perf_session *session)
 {
-	struct perf_evlist *evlist = session->evlist;
+	struct evlist *evlist = session->evlist;
 	struct evsel *evsel;
 
 	evlist__for_each_entry(evlist, evsel) {
tools/perf/util/evlist.c +97 -97

744 lines not on this page · raw message

tools/perf/util/evlist.h +80 -80

293 lines not on this page · raw message

tools/perf/util/evsel.c +2 -2
index 44421bbebd64..f7f97ca6e96d 100644
@@ -3044,7 +3044,7 @@ struct perf_env *perf_evsel__env(struct evsel *evsel)
 	return NULL;
 }
 
-static int store_evsel_ids(struct evsel *evsel, struct perf_evlist *evlist)
+static int store_evsel_ids(struct evsel *evsel, struct evlist *evlist)
 {
 	int cpu, thread;
 
@@ -3062,7 +3062,7 @@ static int store_evsel_ids(struct evsel *evsel, struct perf_evlist *evlist)
 	return 0;
 }
 
-int perf_evsel__store_ids(struct evsel *evsel, struct perf_evlist *evlist)
+int perf_evsel__store_ids(struct evsel *evsel, struct evlist *evlist)
 {
 	struct perf_cpu_map *cpus = evsel->cpus;
 	struct perf_thread_map *threads = evsel->threads;
tools/perf/util/evsel.h +2 -2
index 2c31c5e99524..3caabd8a4aa6 100644
@@ -102,7 +102,7 @@ struct bpf_object;
  */
 struct evsel {
 	struct list_head	node;
-	struct perf_evlist	*evlist;
+	struct evlist	*evlist;
 	struct perf_event_attr	attr;
 	char			*filter;
 	struct xyarray		*fd;
@@ -506,5 +506,5 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
 
 struct perf_env *perf_evsel__env(struct evsel *evsel);
 
-int perf_evsel__store_ids(struct evsel *evsel, struct perf_evlist *evlist);
+int perf_evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
 #endif /* __PERF_EVSEL_H */
tools/perf/util/header.c +43 -43

50 lines not on this page · raw message

tools/perf/util/header.h +8 -8
index 437d8617de27..3e48ae3c49b1 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.c +1 -1
index 3da49c479880..bb5437f549b6 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/hist.h +5 -5
index 9bf247c638b8..83d5fc15429c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-bts.c +1 -1
index 8fd46d5f4b39..849a5b713b04 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-pt.c +5 -5
index f1595b86d7c7..c88e3d1ee9c7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/kvm-stat.h +2 -2
index 299edd32d3d4..a09c495f866b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/metricgroup.c +3 -3
index 14c423974d63..fdb0d1c5c5cf 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/mmap.c +1 -1
index 177c41fc9842..42a5971146ae 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/parse-events.c +5 -5
index dfde9cb31562..d341b11fb141 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/parse-events.h +3 -3
index 99e206598b60..48111b8fc232 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/python.c +8 -8
index beafbd469b0c..ed57b6b5ed91 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/record.c +4 -4
index ef8f686729fd..a550d78a0b4d 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/s390-sample-raw.c +1 -1
index 159a08220947..6c709647cd8e 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sample-raw.c +1 -1
index c21e1311fb0f..e84bbe0e441a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sample-raw.h +3 -3
index 95d445c87e93..afe1491a117e 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.c +12 -12
index e9d1cf8eb274..c191dc152175 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.h +2 -2
index 2b2427c4c0b9..79e97d17ea04 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sort.c +10 -10
index 133d3a45997f..d8e4392d6e18 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/sort.h +3 -3
index a0f232151d6f..5e34676a98e8 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-display.c +9 -9
index 8da4ddcb2e44..cdfceb5b4d72 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-shadow.c +2 -2
index 8c19f3149f34..d81bcab2e64c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.c +4 -4
index 7acb9a6730fe..efd934ec02c3 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat.h +7 -7
index b64cf0177a91..95b4de7a9d51 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/tool.h +2 -2
index 5d880a6f0a34..7f95dd1d6883 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/top.h +2 -2
index 7e0f363c0658..2023e0bf6165 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

author reviewer
#11 lore raw

PATCH 6/79 perf tools: Rename perf_evsel__init to evsel__init

In reply to Jiri Olsa

Renaming perf_evsel__init to evsel__init, so we don't have a name clash when we add perf_evsel__init in libperf.

---
 tools/perf/util/evsel.c  | 8 ++++----
 tools/perf/util/evsel.h  | 3 +--
 tools/perf/util/python.c | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)
tools/perf/util/evsel.c +4 -4
index f7f97ca6e96d..97bee83f0f98 100644
@@ -223,8 +223,8 @@ bool perf_evsel__is_function_event(struct evsel *evsel)
 #undef FUNCTION_EVENT
 }
 
-void perf_evsel__init(struct evsel *evsel,
-		      struct perf_event_attr *attr, int idx)
+void evsel__init(struct evsel *evsel,
+		 struct perf_event_attr *attr, int idx)
 {
 	evsel->idx	   = idx;
 	evsel->tracking	   = !idx;
@@ -255,7 +255,7 @@ struct evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
 
 	if (!evsel)
 		return NULL;
-	perf_evsel__init(evsel, attr, idx);
+	evsel__init(evsel, attr, idx);
 
 	if (perf_evsel__is_bpf_output(evsel)) {
 		evsel->attr.sample_type |= (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME |
@@ -350,7 +350,7 @@ struct evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx)
 		event_attr_init(&attr);
 		attr.config = evsel->tp_format->id;
 		attr.sample_period = 1;
-		perf_evsel__init(evsel, &attr, idx);
+		evsel__init(evsel, &attr, idx);
 	}
 
 	return evsel;
tools/perf/util/evsel.h +1 -2
index 3caabd8a4aa6..af230d92fbef 100644
@@ -238,8 +238,7 @@ struct evsel *perf_evsel__new_cycles(bool precise);
 
 struct tep_event *event_format__new(const char *sys, const char *name);
 
-void perf_evsel__init(struct evsel *evsel,
-		      struct perf_event_attr *attr, int idx);
+void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
 void perf_evsel__exit(struct evsel *evsel);
 void perf_evsel__delete(struct evsel *evsel);
 
tools/perf/util/python.c +1 -1
index ed57b6b5ed91..f6fe3c90828f 100644
@@ -782,7 +782,7 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel,
 	attr.sample_id_all  = sample_id_all;
 	attr.size	    = sizeof(attr);
 
-	perf_evsel__init(&pevsel->evsel, &attr, idx);
+	evsel__init(&pevsel->evsel, &attr, idx);
 	return 0;
 }
 
Signature · 1 line
2.21.0
#12 lore raw

[tip:perf/core] perf evsel: Rename perf_evsel__init() to evsel__init()

perf evsel: Rename perf_evsel__init() to evsel__init()
Commit-ID:  b4b62ee688eb39151c9d8182c3e2f12c9d34602d
Gitweb:     https://git.kernel.org/tip/b4b62ee688eb39151c9d8182c3e2f12c9d34602d
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:53 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf evsel: Rename perf_evsel__init() to evsel__init()

Rename perf_evsel__init() to evsel__init(), so we don't have a name clash when we add perf_evsel__init() in libperf.

---
 tools/perf/util/evsel.c  | 8 ++++----
 tools/perf/util/evsel.h  | 3 +--
 tools/perf/util/python.c | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)
tools/perf/util/evsel.c +4 -4
index f7f97ca6e96d..97bee83f0f98 100644
@@ -223,8 +223,8 @@ bool perf_evsel__is_function_event(struct evsel *evsel)
 #undef FUNCTION_EVENT
 }
 
-void perf_evsel__init(struct evsel *evsel,
-		      struct perf_event_attr *attr, int idx)
+void evsel__init(struct evsel *evsel,
+		 struct perf_event_attr *attr, int idx)
 {
 	evsel->idx	   = idx;
 	evsel->tracking	   = !idx;
@@ -255,7 +255,7 @@ struct evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
 
 	if (!evsel)
 		return NULL;
-	perf_evsel__init(evsel, attr, idx);
+	evsel__init(evsel, attr, idx);
 
 	if (perf_evsel__is_bpf_output(evsel)) {
 		evsel->attr.sample_type |= (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME |
@@ -350,7 +350,7 @@ struct evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx)
 		event_attr_init(&attr);
 		attr.config = evsel->tp_format->id;
 		attr.sample_period = 1;
-		perf_evsel__init(evsel, &attr, idx);
+		evsel__init(evsel, &attr, idx);
 	}
 
 	return evsel;
tools/perf/util/evsel.h +1 -2
index 3caabd8a4aa6..af230d92fbef 100644
@@ -238,8 +238,7 @@ struct evsel *perf_evsel__new_cycles(bool precise);
 
 struct tep_event *event_format__new(const char *sys, const char *name);
 
-void perf_evsel__init(struct evsel *evsel,
-		      struct perf_event_attr *attr, int idx);
+void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
 void perf_evsel__exit(struct evsel *evsel);
 void perf_evsel__delete(struct evsel *evsel);
 
tools/perf/util/python.c +1 -1
index ed57b6b5ed91..f6fe3c90828f 100644
@@ -782,7 +782,7 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel,
 	attr.sample_id_all  = sample_id_all;
 	attr.size	    = sizeof(attr);
 
-	perf_evsel__init(&pevsel->evsel, &attr, idx);
+	evsel__init(&pevsel->evsel, &attr, idx);
 	return 0;
 }
 
author reviewer
#13 lore raw

PATCH 7/79 perf tools: Rename perf_evlist__init to evlist__init

In reply to Jiri Olsa

Renaming perf_evlist__init to evlist__init, so we don't have a name clash when we add perf_evlist__init in libperf.

---
 tools/perf/util/evlist.c | 6 +++---
 tools/perf/util/evlist.h | 4 ++--
 tools/perf/util/python.c | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/util/evlist.c +3 -3
index c234fa4ba92a..4fcd55c8a8d5 100644
@@ -41,8 +41,8 @@ int sigqueue(pid_t pid, int sig, const union sigval value);
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
-void perf_evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
-		       struct perf_thread_map *threads)
+void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
+		  struct perf_thread_map *threads)
 {
 	int i;
 
@@ -60,7 +60,7 @@ struct evlist *perf_evlist__new(void)
 	struct evlist *evlist = zalloc(sizeof(*evlist));
 
 	if (evlist != NULL)
-		perf_evlist__init(evlist, NULL, NULL);
+		evlist__init(evlist, NULL, NULL);
 
 	return evlist;
 }
tools/perf/util/evlist.h +2 -2
index 54f1c3e2b721..d6a3fa461566 100644
@@ -68,8 +68,8 @@ struct evsel_str_handler {
 struct evlist *perf_evlist__new(void);
 struct evlist *perf_evlist__new_default(void);
 struct evlist *perf_evlist__new_dummy(void);
-void perf_evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
-		       struct perf_thread_map *threads);
+void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
+		  struct perf_thread_map *threads);
 void perf_evlist__exit(struct evlist *evlist);
 void perf_evlist__delete(struct evlist *evlist);
 
tools/perf/util/python.c +1 -1
index f6fe3c90828f..ade4e85c6d81 100644
@@ -873,7 +873,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist,
 
 	threads = ((struct pyrf_thread_map *)pthreads)->threads;
 	cpus = ((struct pyrf_cpu_map *)pcpus)->cpus;
-	perf_evlist__init(&pevlist->evlist, cpus, threads);
+	evlist__init(&pevlist->evlist, cpus, threads);
 	return 0;
 }
 
Signature · 1 line
2.21.0
#14 lore raw

[tip:perf/core] perf evlist: Rename perf_evlist__init() to evlist__init()

perf evlist: Rename perf_evlist__init() to evlist__init()
Commit-ID:  52c86bca94b42239563b1510d5fc6329b0ec1a86
Gitweb:     https://git.kernel.org/tip/52c86bca94b42239563b1510d5fc6329b0ec1a86
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 21 Jul 2019 13:23:54 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300

perf evlist: Rename perf_evlist__init() to evlist__init()

Rename perf_evlist__init() to evlist__init(), so we don't have a name clash when we add perf_evlist__init() in libperf.

---
 tools/perf/util/evlist.c | 6 +++---
 tools/perf/util/evlist.h | 4 ++--
 tools/perf/util/python.c | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/util/evlist.c +3 -3
index c234fa4ba92a..4fcd55c8a8d5 100644
@@ -41,8 +41,8 @@ int sigqueue(pid_t pid, int sig, const union sigval value);
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
 #define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
 
-void perf_evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
-		       struct perf_thread_map *threads)
+void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
+		  struct perf_thread_map *threads)
 {
 	int i;
 
@@ -60,7 +60,7 @@ struct evlist *perf_evlist__new(void)
 	struct evlist *evlist = zalloc(sizeof(*evlist));
 
 	if (evlist != NULL)
-		perf_evlist__init(evlist, NULL, NULL);
+		evlist__init(evlist, NULL, NULL);
 
 	return evlist;
 }
tools/perf/util/evlist.h +2 -2
index 54f1c3e2b721..d6a3fa461566 100644
@@ -68,8 +68,8 @@ struct evsel_str_handler {
 struct evlist *perf_evlist__new(void);
 struct evlist *perf_evlist__new_default(void);
 struct evlist *perf_evlist__new_dummy(void);
-void perf_evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
-		       struct perf_thread_map *threads);
+void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
+		  struct perf_thread_map *threads);
 void perf_evlist__exit(struct evlist *evlist);
 void perf_evlist__delete(struct evlist *evlist);
 
tools/perf/util/python.c +1 -1
index f6fe3c90828f..ade4e85c6d81 100644
@@ -873,7 +873,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist,
 
 	threads = ((struct pyrf_thread_map *)pthreads)->threads;
 	cpus = ((struct pyrf_cpu_map *)pcpus)->cpus;
-	perf_evlist__init(&pevlist->evlist, cpus, threads);
+	evlist__init(&pevlist->evlist, cpus, threads);
 	return 0;
 }