public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: namhyung@kernel.org
Cc: irogers@google.com, acme@kernel.org, adrian.hunter@intel.com,
	 ajones@ventanamicro.com, ak@linux.intel.com, alex@ghiti.fr,
	 alexander.shishkin@linux.intel.com, anup@brainfault.org,
	 aou@eecs.berkeley.edu, atrajeev@linux.ibm.com,
	blakejones@google.com,  ctshao@google.com,
	dapeng1.mi@linux.intel.com, derek.foreman@collabora.com,
	 dvyukov@google.com, howardchu95@gmail.com,
	hrishikesh123s@gmail.com,  james.clark@linaro.org,
	jolsa@kernel.org, krzysztof.m.lopatowski@gmail.com,
	 leo.yan@arm.com, linux-kernel@vger.kernel.org,
	 linux-perf-users@vger.kernel.org, linux@treblig.org,
	mingo@redhat.com,  nichen@iscas.ac.cn, palmer@dabbelt.com,
	peterz@infradead.org, pjw@kernel.org,  ravi.bangoria@amd.com,
	swapnil.sapkal@amd.com, tanze@kylinos.cn,
	 thomas.falcon@intel.com, tianyou.li@intel.com,
	yujie.liu@intel.com,  zhouquan@iscas.ac.cn
Subject: [PATCH v8 02/29] perf tool: Remove evsel from tool APIs that pass the sample
Date: Fri, 10 Apr 2026 23:56:51 -0700	[thread overview]
Message-ID: <20260411065718.372240-3-irogers@google.com> (raw)
In-Reply-To: <20260411065718.372240-1-irogers@google.com>

Now struct perf_sample has the evsel within it there is no need to
pass the evsel along with the sample. In the called functions read the
sample's evsel in to a variable if there are multiple uses, or use
directly if there is just one use - the goal being to leave the code
with as little change as possible. Some functions only use the evsel
to pass to another function which they also pass the sample, in those
cases just pass the sample and get the evsel in the called function.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-annotate.c       |  3 +--
 tools/perf/builtin-c2c.c            |  2 +-
 tools/perf/builtin-diff.c           |  2 +-
 tools/perf/builtin-inject.c         | 19 ++++++---------
 tools/perf/builtin-kmem.c           |  2 +-
 tools/perf/builtin-kvm.c            |  5 ++--
 tools/perf/builtin-kwork.c          |  2 +-
 tools/perf/builtin-lock.c           |  2 +-
 tools/perf/builtin-mem.c            |  1 -
 tools/perf/builtin-record.c         |  3 +--
 tools/perf/builtin-report.c         | 10 +++-----
 tools/perf/builtin-sched.c          |  4 +--
 tools/perf/builtin-script.c         |  4 +--
 tools/perf/builtin-timechart.c      |  2 +-
 tools/perf/builtin-trace.c          |  2 +-
 tools/perf/util/build-id.c          |  3 +--
 tools/perf/util/build-id.h          |  7 +-----
 tools/perf/util/data-convert-bt.c   |  2 +-
 tools/perf/util/data-convert-json.c |  5 ++--
 tools/perf/util/intel-tpebs.c       |  3 +--
 tools/perf/util/jitdump.c           |  2 +-
 tools/perf/util/session.c           | 38 ++++++++++++++---------------
 tools/perf/util/tool.c              |  4 +--
 tools/perf/util/tool.h              |  4 +--
 24 files changed, 55 insertions(+), 76 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 5e57b78548f4..58e56f826367 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -283,7 +283,6 @@ static int evsel__add_sample(struct evsel *evsel, struct perf_sample *sample,
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool);
@@ -302,7 +301,7 @@ static int process_sample_event(const struct perf_tool *tool,
 		goto out_put;
 
 	if (!al.filtered &&
-	    evsel__add_sample(evsel, sample, &al, ann, machine)) {
+	    evsel__add_sample(sample->evsel, sample, &al, ann, machine)) {
 		pr_warning("problem incrementing symbol count, "
 			   "skipping event\n");
 		ret = -1;
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 72a7802775ee..7593e5908fcc 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -314,9 +314,9 @@ static void perf_c2c__evsel_hists_inc_stats(struct evsel *evsel,
 static int process_sample_event(const struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
+	struct evsel *evsel = sample->evsel;
 	struct c2c_hists *c2c_hists = &c2c.hists;
 	struct c2c_hist_entry *c2c_he;
 	struct c2c_stats stats = { .nr_entries = 0, };
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 1b3df868849a..82e9e514922b 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -390,11 +390,11 @@ static struct hist_entry_ops block_hist_ops = {
 static int diff__process_sample_event(const struct perf_tool *tool,
 				      union perf_event *event,
 				      struct perf_sample *sample,
-				      struct evsel *evsel,
 				      struct machine *machine)
 {
 	struct perf_diff *pdiff = container_of(tool, struct perf_diff, tool);
 	struct addr_location al;
+	struct evsel *evsel = sample->evsel;
 	struct hists *hists = evsel__hists(evsel);
 	struct hist_entry_iter iter = {
 		.evsel	= evsel,
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index f174bc69cec4..6ba489452777 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -362,18 +362,17 @@ typedef int (*inject_handler)(const struct perf_tool *tool,
 static int perf_event__repipe_sample(const struct perf_tool *tool,
 				     union perf_event *event,
 				     struct perf_sample *sample,
-				     struct evsel *evsel,
 				     struct machine *machine)
 {
-	struct perf_inject *inject = container_of(tool, struct perf_inject,
-						  tool);
+	struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
+	struct evsel *evsel = sample->evsel;
 
 	if (evsel && evsel->handler) {
 		inject_handler f = evsel->handler;
 		return f(tool, event, sample, evsel, machine);
 	}
 
-	build_id__mark_dso_hit(tool, event, sample, evsel, machine);
+	build_id__mark_dso_hit(tool, event, sample, machine);
 
 	if (inject->itrace_synth_opts.set && sample->aux_sample.size) {
 		event = perf_inject__cut_auxtrace_sample(inject, event, sample);
@@ -387,10 +386,10 @@ static int perf_event__repipe_sample(const struct perf_tool *tool,
 static int perf_event__convert_sample_callchain(const struct perf_tool *tool,
 						union perf_event *event,
 						struct perf_sample *sample,
-						struct evsel *evsel,
 						struct machine *machine)
 {
 	struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
+	struct evsel *evsel = sample->evsel;
 	struct callchain_cursor *cursor = get_tls_callchain_cursor();
 	union perf_event *event_copy = (void *)inject->event_copy;
 	struct callchain_cursor_node *node;
@@ -987,10 +986,8 @@ static int mark_dso_hit_callback(struct callchain_cursor_node *node, void *data)
 			    args->mmap_evsel, map, /*sample_in_dso=*/false);
 }
 
-int perf_event__inject_buildid(const struct perf_tool *tool, union perf_event *event,
-			       struct perf_sample *sample,
-			       struct evsel *evsel __maybe_unused,
-			       struct machine *machine)
+static int perf_event__inject_buildid(const struct perf_tool *tool, union perf_event *event,
+				      struct perf_sample *sample, struct machine *machine)
 {
 	struct addr_location al;
 	struct thread *thread;
@@ -1020,7 +1017,7 @@ int perf_event__inject_buildid(const struct perf_tool *tool, union perf_event *e
 			     /*sample_in_dso=*/true);
 	}
 
-	sample__for_each_callchain_node(thread, evsel, sample, PERF_MAX_STACK_DEPTH,
+	sample__for_each_callchain_node(thread, sample->evsel, sample, PERF_MAX_STACK_DEPTH,
 					/*symbols=*/false, mark_dso_hit_callback, &args);
 	thread__put(thread);
 repipe:
@@ -1101,7 +1098,7 @@ static int perf_inject__sched_stat(const struct perf_tool *tool,
 	sample_sw.time	 = sample->time;
 	perf_event__synthesize_sample(event_sw, evsel->core.attr.sample_type,
 				      evsel->core.attr.read_format, &sample_sw);
-	build_id__mark_dso_hit(tool, event_sw, &sample_sw, evsel, machine);
+	build_id__mark_dso_hit(tool, event_sw, &sample_sw, machine);
 	ret = perf_event__repipe(tool, event_sw, &sample_sw, machine);
 	perf_sample__exit(&sample_sw);
 	return ret;
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 9c64a0d74823..45b383fa9ce9 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -960,9 +960,9 @@ typedef int (*tracepoint_handler)(struct evsel *evsel,
 static int process_sample_event(const struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
+	struct evsel *evsel = sample->evsel;
 	int err = 0;
 	struct thread *thread = machine__findnew_thread(machine, sample->pid,
 							sample->tid);
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 0c5e6b3aac74..5e8e6fde097a 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -941,9 +941,9 @@ struct vcpu_event_record *per_vcpu_record(struct thread *thread,
 
 static bool handle_kvm_event(struct perf_kvm_stat *kvm,
 			     struct thread *thread,
-			     struct evsel *evsel,
 			     struct perf_sample *sample)
 {
+	struct evsel *evsel = sample->evsel;
 	struct vcpu_event_record *vcpu_record;
 	struct event_key key = { .key = INVALID_KEY,
 				 .exit_reasons = kvm->exit_reasons };
@@ -1133,7 +1133,6 @@ static bool skip_sample(struct perf_kvm_stat *kvm,
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
 	int err = 0;
@@ -1156,7 +1155,7 @@ static int process_sample_event(const struct perf_tool *tool,
 		return -1;
 	}
 
-	if (!handle_kvm_event(kvm, thread, evsel, sample))
+	if (!handle_kvm_event(kvm, thread, sample))
 		err = -1;
 
 	thread__put(thread);
diff --git a/tools/perf/builtin-kwork.c b/tools/perf/builtin-kwork.c
index 9d3a4c779a41..d4bb19ed91b5 100644
--- a/tools/perf/builtin-kwork.c
+++ b/tools/perf/builtin-kwork.c
@@ -1955,9 +1955,9 @@ typedef int (*tracepoint_handler)(const struct perf_tool *tool,
 static int perf_kwork__process_tracepoint_sample(const struct perf_tool *tool,
 						 union perf_event *event __maybe_unused,
 						 struct perf_sample *sample,
-						 struct evsel *evsel,
 						 struct machine *machine)
 {
+	struct evsel *evsel = sample->evsel;
 	int err = 0;
 
 	if (evsel->handler != NULL) {
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 5585aeb97684..4d8ddf6391e8 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -1430,9 +1430,9 @@ typedef int (*tracepoint_handler)(struct evsel *evsel,
 static int process_sample_event(const struct perf_tool *tool __maybe_unused,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
+	struct evsel *evsel = sample->evsel;
 	int err = 0;
 	struct thread *thread = machine__findnew_thread(machine, sample->pid,
 							sample->tid);
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index d43500b92a7b..6101a26b3a78 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -255,7 +255,6 @@ dump_raw_samples(const struct perf_tool *tool,
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel __maybe_unused,
 				struct machine *machine)
 {
 	return dump_raw_samples(tool, event, sample, machine);
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4a5eba498c02..9ba787406919 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1489,7 +1489,6 @@ static void set_timestamp_boundary(struct record *rec, u64 sample_time)
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct record *rec = container_of(tool, struct record, tool);
@@ -1500,7 +1499,7 @@ static int process_sample_event(const struct perf_tool *tool,
 		return 0;
 
 	rec->samples++;
-	return build_id__mark_dso_hit(tool, event, sample, evsel, machine);
+	return build_id__mark_dso_hit(tool, event, sample, machine);
 }
 
 static int process_buildids(struct record *rec)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 95c0bdba6b11..848e2ccb1420 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -264,10 +264,10 @@ static int process_feature_event(const struct perf_tool *tool,
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct report *rep = container_of(tool, struct report, tool);
+	struct evsel *evsel = sample->evsel;
 	struct addr_location al;
 	struct hist_entry_iter iter = {
 		.evsel 			= evsel,
@@ -344,7 +344,6 @@ static int process_sample_event(const struct perf_tool *tool,
 static int process_read_event(const struct perf_tool *tool,
 			      union perf_event *event,
 			      struct perf_sample *sample __maybe_unused,
-			      struct evsel *evsel,
 			      struct machine *machine __maybe_unused)
 {
 	struct report *rep = container_of(tool, struct report, tool);
@@ -352,7 +351,7 @@ static int process_read_event(const struct perf_tool *tool,
 	if (rep->show_threads) {
 		int err = perf_read_values_add_value(&rep->show_threads_values,
 					   event->read.pid, event->read.tid,
-					   evsel,
+					   sample->evsel,
 					   event->read.value);
 
 		if (err)
@@ -778,11 +777,10 @@ static void report__output_resort(struct report *rep)
 
 static int count_sample_event(const struct perf_tool *tool __maybe_unused,
 			      union perf_event *event __maybe_unused,
-			      struct perf_sample *sample __maybe_unused,
-			      struct evsel *evsel,
+			      struct perf_sample *sample,
 			      struct machine *machine __maybe_unused)
 {
-	struct hists *hists = evsel__hists(evsel);
+	struct hists *hists = evsel__hists(sample->evsel);
 
 	hists__inc_nr_events(hists);
 	return 0;
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 555247568e7a..0713e6b28f92 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1867,9 +1867,9 @@ typedef int (*tracepoint_handler)(const struct perf_tool *tool,
 static int perf_sched__process_tracepoint_sample(const struct perf_tool *tool __maybe_unused,
 						 union perf_event *event __maybe_unused,
 						 struct perf_sample *sample,
-						 struct evsel *evsel,
 						 struct machine *machine)
 {
+	struct evsel *evsel = sample->evsel;
 	int err = 0;
 
 	if (evsel->handler != NULL) {
@@ -3184,10 +3184,10 @@ typedef int (*sched_handler)(const struct perf_tool *tool,
 static int perf_timehist__process_sample(const struct perf_tool *tool,
 					 union perf_event *event,
 					 struct perf_sample *sample,
-					 struct evsel *evsel,
 					 struct machine *machine)
 {
 	struct perf_sched *sched = container_of(tool, struct perf_sched, tool);
+	struct evsel *evsel = sample->evsel;
 	int err = 0;
 	struct perf_cpu this_cpu = {
 		.cpu = sample->cpu,
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index c8ac9f01a36b..3ffb8baf40f6 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2645,10 +2645,10 @@ static bool filter_cpu(struct perf_sample *sample)
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct perf_script *scr = container_of(tool, struct perf_script, tool);
+	struct evsel *evsel = sample->evsel;
 	struct addr_location al;
 	struct addr_location addr_al;
 	int ret = 0;
@@ -2729,10 +2729,10 @@ static int process_sample_event(const struct perf_tool *tool,
 static int process_deferred_sample_event(const struct perf_tool *tool,
 					 union perf_event *event,
 					 struct perf_sample *sample,
-					 struct evsel *evsel,
 					 struct machine *machine)
 {
 	struct perf_script *scr = container_of(tool, struct perf_script, tool);
+	struct evsel *evsel = sample->evsel;
 	struct perf_event_attr *attr = &evsel->core.attr;
 	struct evsel_script *es = evsel->priv;
 	unsigned int type = output_type(attr->type);
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 28f33e39895d..8692d11ccd29 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -574,10 +574,10 @@ typedef int (*tracepoint_handler)(struct timechart *tchart,
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine)
 {
 	struct timechart *tchart = container_of(tool, struct timechart, tool);
+	struct evsel *evsel = sample->evsel;
 
 	if (evsel->core.attr.sample_type & PERF_SAMPLE_TIME) {
 		if (!tchart->first_time || tchart->first_time > sample->time)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index e58c49d047a2..d9e80740e9ac 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3464,10 +3464,10 @@ static void trace__set_base_time(struct trace *trace,
 static int trace__process_sample(const struct perf_tool *tool,
 				 union perf_event *event,
 				 struct perf_sample *sample,
-				 struct evsel *evsel,
 				 struct machine *machine __maybe_unused)
 {
 	struct trace *trace = container_of(tool, struct trace, tool);
+	struct evsel *evsel = sample->evsel;
 	struct thread *thread;
 	int err = 0;
 
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index fdb35133fde4..55b72235f891 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -55,7 +55,6 @@ static int mark_dso_hit_callback(struct callchain_cursor_node *node, void *data
 int build_id__mark_dso_hit(const struct perf_tool *tool __maybe_unused,
 			   union perf_event *event,
 			   struct perf_sample *sample,
-			   struct evsel *evsel,
 			   struct machine *machine)
 {
 	struct addr_location al;
@@ -74,7 +73,7 @@ int build_id__mark_dso_hit(const struct perf_tool *tool __maybe_unused,
 
 	addr_location__exit(&al);
 
-	sample__for_each_callchain_node(thread, evsel, sample, PERF_MAX_STACK_DEPTH,
+	sample__for_each_callchain_node(thread, sample->evsel, sample, PERF_MAX_STACK_DEPTH,
 					/*symbols=*/false, mark_dso_hit_callback, /*data=*/NULL);
 
 
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h
index 47e621cebe1b..73bad90b06f9 100644
--- a/tools/perf/util/build-id.h
+++ b/tools/perf/util/build-id.h
@@ -34,12 +34,7 @@ char *__dso__build_id_filename(const struct dso *dso, char *bf, size_t size,
 			       bool is_debug, bool is_kallsyms);
 
 int build_id__mark_dso_hit(const struct perf_tool *tool, union perf_event *event,
-			   struct perf_sample *sample, struct evsel *evsel,
-			   struct machine *machine);
-
-int perf_event__inject_buildid(const struct perf_tool *tool, union perf_event *event,
-			       struct perf_sample *sample, struct evsel *evsel,
-			       struct machine *machine);
+			   struct perf_sample *sample, struct machine *machine);
 
 bool perf_session__read_build_ids(struct perf_session *session, bool with_hits);
 int perf_session__write_buildid_table(struct perf_session *session,
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 3b8f2df823a9..b3f745cff2a7 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -803,10 +803,10 @@ static bool is_flush_needed(struct ctf_stream *cs)
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *_event,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine __maybe_unused)
 {
 	struct convert *c = container_of(tool, struct convert, tool);
+	struct evsel *evsel = sample->evsel;
 	struct evsel_priv *priv = evsel->priv;
 	struct ctf_writer *cw = &c->writer;
 	struct ctf_stream *cs;
diff --git a/tools/perf/util/data-convert-json.c b/tools/perf/util/data-convert-json.c
index d526c91312ed..a7da93a7ff0e 100644
--- a/tools/perf/util/data-convert-json.c
+++ b/tools/perf/util/data-convert-json.c
@@ -159,13 +159,12 @@ static void output_sample_callchain_entry(const struct perf_tool *tool,
 static int process_sample_event(const struct perf_tool *tool,
 				union perf_event *event __maybe_unused,
 				struct perf_sample *sample,
-				struct evsel *evsel __maybe_unused,
 				struct machine *machine)
 {
 	struct convert_json *c = container_of(tool, struct convert_json, tool);
 	FILE *out = c->out;
 	struct addr_location al;
-	u64 sample_type = __evlist__combined_sample_type(evsel->evlist);
+	u64 sample_type = __evlist__combined_sample_type(sample->evsel->evlist);
 	u8 cpumode = PERF_RECORD_MISC_USER;
 
 	addr_location__init(&al);
@@ -245,7 +244,7 @@ static int process_sample_event(const struct perf_tool *tool,
 
 #ifdef HAVE_LIBTRACEEVENT
 	if (sample->raw_data) {
-		struct tep_event *tp_format = evsel__tp_format(evsel);
+		struct tep_event *tp_format = evsel__tp_format(sample->evsel);
 		struct tep_format_field **fields = tp_format ? tep_event_fields(tp_format) : NULL;
 
 		if (fields) {
diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c
index 8b615dc94e9e..ed8cfe2ba2fa 100644
--- a/tools/perf/util/intel-tpebs.c
+++ b/tools/perf/util/intel-tpebs.c
@@ -185,7 +185,6 @@ static bool should_ignore_sample(const struct perf_sample *sample, const struct
 static int process_sample_event(const struct perf_tool *tool __maybe_unused,
 				union perf_event *event __maybe_unused,
 				struct perf_sample *sample,
-				struct evsel *evsel,
 				struct machine *machine __maybe_unused)
 {
 	struct tpebs_retire_lat *t;
@@ -196,7 +195,7 @@ static int process_sample_event(const struct perf_tool *tool __maybe_unused,
 		mutex_unlock(tpebs_mtx_get());
 		return 0;
 	}
-	t = tpebs_retire_lat__find(evsel);
+	t = tpebs_retire_lat__find(sample->evsel);
 	if (!t) {
 		mutex_unlock(tpebs_mtx_get());
 		return -EINVAL;
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index e0ce8b904729..52e6ffac2b3e 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -642,7 +642,7 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr)
 
 	ret = jit_inject_event(jd, event);
 	if (!ret)
-		build_id__mark_dso_hit(tool, event, &sample, NULL, jd->machine);
+		build_id__mark_dso_hit(tool, event, &sample, jd->machine);
 out:
 	perf_sample__exit(&sample);
 	return ret;
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index fe0de2a0277f..1e25892963b7 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1117,9 +1117,10 @@ char *get_page_size_name(u64 size, char *str)
 	return str;
 }
 
-static void dump_sample(struct machine *machine, struct evsel *evsel, union perf_event *event,
+static void dump_sample(struct machine *machine, union perf_event *event,
 			struct perf_sample *sample)
 {
+	struct evsel *evsel = sample->evsel;
 	u64 sample_type;
 	char str[PAGE_SIZE_NAME_LEN];
 	uint16_t e_machine = EM_NONE;
@@ -1183,9 +1184,10 @@ static void dump_sample(struct machine *machine, struct evsel *evsel, union perf
 		sample_read__printf(sample, evsel->core.attr.read_format);
 }
 
-static void dump_deferred_callchain(struct evsel *evsel, union perf_event *event,
-				    struct perf_sample *sample)
+static void dump_deferred_callchain(union perf_event *event, struct perf_sample *sample)
 {
+	struct evsel *evsel = sample->evsel;
+
 	if (!dump_trace)
 		return;
 
@@ -1291,7 +1293,7 @@ static int deliver_sample_value(struct evlist *evlist,
 		return 0;
 
 	sample->evsel = container_of(sid->evsel, struct evsel, core);
-	ret = tool->sample(tool, event, sample, sample->evsel, machine);
+	ret = tool->sample(tool, event, sample, machine);
 	sample->evsel = saved_evsel;
 	return ret;
 }
@@ -1323,8 +1325,9 @@ static int deliver_sample_group(struct evlist *evlist,
 
 static int evlist__deliver_sample(struct evlist *evlist, const struct perf_tool *tool,
 				  union  perf_event *event, struct perf_sample *sample,
-				  struct evsel *evsel, struct machine *machine)
+				  struct machine *machine)
 {
+	struct evsel *evsel = sample->evsel;
 	/* We know evsel != NULL. */
 	u64 sample_type = evsel->core.attr.sample_type;
 	u64 read_format = evsel->core.attr.read_format;
@@ -1332,7 +1335,7 @@ static int evlist__deliver_sample(struct evlist *evlist, const struct perf_tool
 
 	/* Standard sample delivery. */
 	if (!(sample_type & PERF_SAMPLE_READ))
-		return tool->sample(tool, event, sample, evsel, machine);
+		return tool->sample(tool, event, sample, machine);
 
 	/* For PERF_SAMPLE_READ we have either single or group mode. */
 	if (read_format & PERF_FORMAT_GROUP)
@@ -1371,8 +1374,7 @@ static int evlist__deliver_deferred_callchain(struct evlist *evlist,
 		struct evsel *saved_evsel = sample->evsel;
 
 		sample->evsel = evlist__id2evsel(evlist, sample->id);
-		ret = tool->callchain_deferred(tool, event, sample,
-					       sample->evsel, machine);
+		ret = tool->callchain_deferred(tool, event, sample, machine);
 		sample->evsel = saved_evsel;
 		return ret;
 	}
@@ -1400,7 +1402,7 @@ static int evlist__deliver_deferred_callchain(struct evlist *evlist,
 
 		orig_sample.evsel = evlist__id2evsel(evlist, orig_sample.id);
 		ret = evlist__deliver_sample(evlist, tool, de->event,
-					     &orig_sample, orig_sample.evsel, machine);
+					     &orig_sample, machine);
 
 		perf_sample__exit(&orig_sample);
 		list_del(&de->list);
@@ -1438,7 +1440,7 @@ static int session__flush_deferred_samples(struct perf_session *session,
 
 		sample.evsel = evlist__id2evsel(evlist, sample.id);
 		ret = evlist__deliver_sample(evlist, tool, de->event,
-					     &sample, sample.evsel, machine);
+					     &sample, machine);
 
 		perf_sample__exit(&sample);
 		list_del(&de->list);
@@ -1458,7 +1460,6 @@ static int machines__deliver_event(struct machines *machines,
 				   const struct perf_tool *tool, u64 file_offset,
 				   const char *file_path)
 {
-	struct evsel *evsel;
 	struct machine *machine;
 
 	dump_event(evlist, event, file_offset, sample, file_path);
@@ -1468,21 +1469,20 @@ static int machines__deliver_event(struct machines *machines,
 	else
 		assert(sample->evsel == evlist__id2evsel(evlist, sample->id));
 
-	evsel = sample->evsel;
 	machine = machines__find_for_cpumode(machines, event, sample);
 
 	switch (event->header.type) {
 	case PERF_RECORD_SAMPLE:
-		if (evsel == NULL) {
+		if (sample->evsel == NULL) {
 			++evlist->stats.nr_unknown_id;
 			return 0;
 		}
 		if (machine == NULL) {
 			++evlist->stats.nr_unprocessable_samples;
-			dump_sample(machine, evsel, event, sample);
+			dump_sample(machine, event, sample);
 			return 0;
 		}
-		dump_sample(machine, evsel, event, sample);
+		dump_sample(machine, event, sample);
 		if (sample->deferred_callchain && tool->merge_deferred_callchains) {
 			struct deferred_event *de = malloc(sizeof(*de));
 			size_t sz = event->header.size;
@@ -1499,7 +1499,7 @@ static int machines__deliver_event(struct machines *machines,
 			list_add_tail(&de->list, &evlist->deferred_samples);
 			return 0;
 		}
-		return evlist__deliver_sample(evlist, tool, event, sample, evsel, machine);
+		return evlist__deliver_sample(evlist, tool, event, sample, machine);
 	case PERF_RECORD_MMAP:
 		return tool->mmap(tool, event, sample, machine);
 	case PERF_RECORD_MMAP2:
@@ -1527,8 +1527,8 @@ static int machines__deliver_event(struct machines *machines,
 			evlist->stats.total_lost_samples += event->lost_samples.lost;
 		return tool->lost_samples(tool, event, sample, machine);
 	case PERF_RECORD_READ:
-		dump_read(evsel, event);
-		return tool->read(tool, event, sample, evsel, machine);
+		dump_read(sample->evsel, event);
+		return tool->read(tool, event, sample, machine);
 	case PERF_RECORD_THROTTLE:
 		return tool->throttle(tool, event, sample, machine);
 	case PERF_RECORD_UNTHROTTLE:
@@ -1557,7 +1557,7 @@ static int machines__deliver_event(struct machines *machines,
 	case PERF_RECORD_AUX_OUTPUT_HW_ID:
 		return tool->aux_output_hw_id(tool, event, sample, machine);
 	case PERF_RECORD_CALLCHAIN_DEFERRED:
-		dump_deferred_callchain(evsel, event, sample);
+		dump_deferred_callchain(event, sample);
 		return evlist__deliver_deferred_callchain(evlist, tool, event,
 							  sample, machine);
 	default:
diff --git a/tools/perf/util/tool.c b/tools/perf/util/tool.c
index 013c7839e2cf..0f285a2574c8 100644
--- a/tools/perf/util/tool.c
+++ b/tools/perf/util/tool.c
@@ -110,7 +110,6 @@ static int process_event_synth_event_update_stub(const struct perf_tool *tool __
 int process_event_sample_stub(const struct perf_tool *tool __maybe_unused,
 			      union perf_event *event __maybe_unused,
 			      struct perf_sample *sample __maybe_unused,
-			      struct evsel *evsel __maybe_unused,
 			      struct machine *machine __maybe_unused)
 {
 	dump_printf(": unhandled!\n");
@@ -348,12 +347,11 @@ bool perf_tool__compressed_is_stub(const struct perf_tool *tool)
 	static int delegate_ ## name(const struct perf_tool *tool, \
 				     union perf_event *event, \
 				     struct perf_sample *sample, \
-				     struct evsel *evsel, \
 				     struct machine *machine) \
 	{								\
 		struct delegate_tool *del_tool = container_of(tool, struct delegate_tool, tool); \
 		struct perf_tool *delegate = del_tool->delegate;		\
-		return delegate->name(delegate, event, sample, evsel, machine);	\
+		return delegate->name(delegate, event, sample, machine);	\
 	}
 CREATE_DELEGATE_SAMPLE(read);
 CREATE_DELEGATE_SAMPLE(sample);
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h
index 2d9a4b1ca9d0..2a4f124ffd8d 100644
--- a/tools/perf/util/tool.h
+++ b/tools/perf/util/tool.h
@@ -9,7 +9,6 @@
 struct perf_session;
 union perf_event;
 struct evlist;
-struct evsel;
 struct perf_sample;
 struct perf_tool;
 struct machine;
@@ -17,7 +16,7 @@ struct ordered_events;
 
 typedef int (*event_sample)(const struct perf_tool *tool, union perf_event *event,
 			    struct perf_sample *sample,
-			    struct evsel *evsel, struct machine *machine);
+			    struct machine *machine);
 
 typedef int (*event_op)(const struct perf_tool *tool, union perf_event *event,
 			struct perf_sample *sample, struct machine *machine);
@@ -103,7 +102,6 @@ bool perf_tool__compressed_is_stub(const struct perf_tool *tool);
 int process_event_sample_stub(const struct perf_tool *tool,
 			      union perf_event *event,
 			      struct perf_sample *sample,
-			      struct evsel *evsel,
 			      struct machine *machine);
 
 struct delegate_tool {
-- 
2.53.0.1213.gd9a14994de-goog


  parent reply	other threads:[~2026-04-11  6:57 UTC|newest]

Thread overview: 228+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 17:40 [PATCH v1 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 01/25] perf sample: Document struct perf_sample Ian Rogers
2026-03-03  3:07   ` Namhyung Kim
2026-03-20  4:41     ` Ian Rogers
2026-02-09 17:40 ` [PATCH v1 02/25] perf sample: Make sure perf_sample__init/exit are used Ian Rogers
2026-03-03 22:38   ` Namhyung Kim
2026-02-09 17:40 ` [PATCH v1 03/25] perf sample: Add evsel to struct perf_sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 04/25] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 05/25] perf kvm: Don't pass evsel with sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 06/25] perf evsel: Refactor evsel__intval to perf_sample__intval Ian Rogers
2026-02-09 17:40 ` [PATCH v1 07/25] perf trace: Don't pass evsel with sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 08/25] perf callchain: Don't pass evsel and sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 09/25] perf lock: Only pass sample to handlers Ian Rogers
2026-02-09 17:40 ` [PATCH v1 10/25] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-02-09 17:40 ` [PATCH v1 11/25] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-02-09 17:40 ` [PATCH v1 12/25] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 13/25] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-02-09 17:40 ` [PATCH v1 14/25] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-02-09 17:40 ` [PATCH v1 15/25] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 16/25] perf inject: Don't pass evsel with sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 17/25] perf kmem: " Ian Rogers
2026-02-09 17:40 ` [PATCH v1 18/25] perf kwork: " Ian Rogers
2026-02-09 17:40 ` [PATCH v1 19/25] perf sched: " Ian Rogers
2026-02-09 17:40 ` [PATCH v1 20/25] perf timechart: " Ian Rogers
2026-02-09 17:40 ` [PATCH v1 21/25] perf trace: " Ian Rogers
2026-02-09 17:40 ` [PATCH v1 22/25] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 23/25] perf script: Don't pass evsel with sample Ian Rogers
2026-02-09 17:40 ` [PATCH v1 24/25] perf s390-sample-raw: " Ian Rogers
2026-02-09 17:40 ` [PATCH v1 25/25] perf evsel: " Ian Rogers
2026-02-23 19:15 ` [PATCH v1 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-03-02 17:56   ` Ian Rogers
2026-03-03  1:15     ` Namhyung Kim
2026-03-04  1:02 ` Namhyung Kim
2026-03-04 16:19   ` Ian Rogers
2026-03-19 23:23 ` [PATCH v2 " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 01/25] perf sample: Document struct perf_sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 02/25] perf sample: Make sure perf_sample__init/exit are used Ian Rogers
2026-03-19 23:23   ` [PATCH v2 03/25] perf sample: Add evsel to struct perf_sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 04/25] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 05/25] perf kvm: Don't pass evsel with sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 06/25] perf evsel: Refactor evsel__intval to perf_sample__intval Ian Rogers
2026-03-19 23:23   ` [PATCH v2 07/25] perf trace: Don't pass evsel with sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 08/25] perf callchain: Don't pass evsel and sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 09/25] perf lock: Only pass sample to handlers Ian Rogers
2026-03-19 23:23   ` [PATCH v2 10/25] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-03-19 23:23   ` [PATCH v2 11/25] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-03-19 23:23   ` [PATCH v2 12/25] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 13/25] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-03-19 23:23   ` [PATCH v2 14/25] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-03-19 23:23   ` [PATCH v2 15/25] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 16/25] perf inject: Don't pass evsel with sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 17/25] perf kmem: " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 18/25] perf kwork: " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 19/25] perf sched: " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 20/25] perf timechart: " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 21/25] perf trace: " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 22/25] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 23/25] perf script: Don't pass evsel with sample Ian Rogers
2026-03-19 23:23   ` [PATCH v2 24/25] perf s390-sample-raw: " Ian Rogers
2026-03-19 23:23   ` [PATCH v2 25/25] perf evsel: " Ian Rogers
2026-03-20  8:08   ` [PATCH v3 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 01/25] perf sample: Document struct perf_sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 02/25] perf sample: Make sure perf_sample__init/exit are used Ian Rogers
2026-03-20  8:08     ` [PATCH v3 03/25] perf sample: Add evsel to struct perf_sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 04/25] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 05/25] perf kvm: Don't pass evsel with sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 06/25] perf evsel: Refactor evsel__intval to perf_sample__intval Ian Rogers
2026-03-20  8:08     ` [PATCH v3 07/25] perf trace: Don't pass evsel with sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 08/25] perf callchain: Don't pass evsel and sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 09/25] perf lock: Only pass sample to handlers Ian Rogers
2026-03-20  8:08     ` [PATCH v3 10/25] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-03-20  8:08     ` [PATCH v3 11/25] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-03-20  8:08     ` [PATCH v3 12/25] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 13/25] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-03-20  8:08     ` [PATCH v3 14/25] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-03-20  8:08     ` [PATCH v3 15/25] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 16/25] perf inject: Don't pass evsel with sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 17/25] perf kmem: " Ian Rogers
2026-03-20  8:08     ` [PATCH v3 18/25] perf kwork: " Ian Rogers
2026-03-20  8:08     ` [PATCH v3 19/25] perf sched: " Ian Rogers
2026-03-20  8:08     ` [PATCH v3 20/25] perf timechart: " Ian Rogers
2026-03-20  8:08     ` [PATCH v3 21/25] perf trace: " Ian Rogers
2026-03-20  8:08     ` [PATCH v3 22/25] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 23/25] perf script: Don't pass evsel with sample Ian Rogers
2026-03-20  8:08     ` [PATCH v3 24/25] perf s390-sample-raw: " Ian Rogers
2026-03-20  8:08     ` [PATCH v3 25/25] perf evsel: " Ian Rogers
2026-03-20 19:26     ` [PATCH v4 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 01/25] perf sample: Document struct perf_sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 02/25] perf sample: Make sure perf_sample__init/exit are used Ian Rogers
2026-04-03  3:10         ` Namhyung Kim
2026-04-03 15:56           ` Ian Rogers
2026-03-20 19:26       ` [PATCH v4 03/25] perf sample: Add evsel to struct perf_sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 04/25] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 05/25] perf kvm: Don't pass evsel with sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 06/25] perf evsel: Refactor evsel__intval to perf_sample__intval Ian Rogers
2026-03-20 19:26       ` [PATCH v4 07/25] perf trace: Don't pass evsel with sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 08/25] perf callchain: Don't pass evsel and sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 09/25] perf lock: Only pass sample to handlers Ian Rogers
2026-03-20 19:26       ` [PATCH v4 10/25] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-03-20 19:26       ` [PATCH v4 11/25] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-03-20 19:26       ` [PATCH v4 12/25] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 13/25] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-03-20 19:26       ` [PATCH v4 14/25] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-03-20 19:26       ` [PATCH v4 15/25] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 16/25] perf inject: Don't pass evsel with sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 17/25] perf kmem: " Ian Rogers
2026-03-20 19:26       ` [PATCH v4 18/25] perf kwork: " Ian Rogers
2026-03-20 19:26       ` [PATCH v4 19/25] perf sched: " Ian Rogers
2026-03-20 19:26       ` [PATCH v4 20/25] perf timechart: " Ian Rogers
2026-03-20 19:26       ` [PATCH v4 21/25] perf trace: " Ian Rogers
2026-03-20 19:26       ` [PATCH v4 22/25] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 23/25] perf script: Don't pass evsel with sample Ian Rogers
2026-03-20 19:26       ` [PATCH v4 24/25] perf s390-sample-raw: Don't pass evsel or its PMU " Ian Rogers
2026-03-20 19:26       ` [PATCH v4 25/25] perf evsel: Don't pass evsel " Ian Rogers
2026-04-01  5:57       ` [PATCH v4 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-04-03 20:39         ` [PATCH v5 " Ian Rogers
2026-04-03 20:39           ` [PATCH v5 01/25] perf sample: Document struct perf_sample Ian Rogers
2026-04-03 20:39           ` [PATCH v5 02/25] perf sample: Make sure perf_sample__init/exit are used Ian Rogers
2026-04-03 20:39           ` [PATCH v5 03/25] perf sample: Add evsel to struct perf_sample Ian Rogers
2026-04-03 20:39           ` [PATCH v5 04/25] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-04-03 20:39           ` [PATCH v5 05/25] perf kvm: Don't pass evsel with sample Ian Rogers
2026-04-03 20:39           ` [PATCH v5 06/25] perf evsel: Refactor evsel tracepoint sample accessors perf_sample Ian Rogers
2026-04-03 20:39           ` [PATCH v5 07/25] perf trace: Don't pass evsel with sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 08/25] perf callchain: Don't pass evsel and sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 09/25] perf lock: Only pass sample to handlers Ian Rogers
2026-04-03 20:40           ` [PATCH v5 10/25] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-04-03 20:40           ` [PATCH v5 11/25] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-04-03 20:40           ` [PATCH v5 12/25] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 13/25] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-04-03 20:40           ` [PATCH v5 14/25] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-04-03 20:40           ` [PATCH v5 15/25] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 16/25] perf inject: Don't pass evsel with sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 17/25] perf kmem: " Ian Rogers
2026-04-03 20:40           ` [PATCH v5 18/25] perf kwork: " Ian Rogers
2026-04-03 20:40           ` [PATCH v5 19/25] perf sched: " Ian Rogers
2026-04-03 20:40           ` [PATCH v5 20/25] perf timechart: " Ian Rogers
2026-04-03 20:40           ` [PATCH v5 21/25] perf trace: " Ian Rogers
2026-04-03 20:40           ` [PATCH v5 22/25] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 23/25] perf script: Don't pass evsel with sample Ian Rogers
2026-04-03 20:40           ` [PATCH v5 24/25] perf s390-sample-raw: Don't pass evsel or its PMU " Ian Rogers
2026-04-03 20:40           ` [PATCH v5 25/25] perf evsel: Don't pass evsel " Ian Rogers
2026-04-04  3:43           ` [PATCH v6 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 01/25] perf sample: Document struct perf_sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 02/25] perf sample: Make sure perf_sample__init/exit are used Ian Rogers
2026-04-04  3:43             ` [PATCH v6 03/25] perf sample: Add evsel to struct perf_sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 04/25] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 05/25] perf kvm: Don't pass evsel with sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 06/25] perf evsel: Refactor evsel tracepoint sample accessors perf_sample Ian Rogers
2026-04-06  6:06               ` Namhyung Kim
2026-04-06 15:24                 ` Ian Rogers
2026-04-06 18:12                   ` Namhyung Kim
2026-04-04  3:43             ` [PATCH v6 07/25] perf trace: Don't pass evsel with sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 08/25] perf callchain: Don't pass evsel and sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 09/25] perf lock: Only pass sample to handlers Ian Rogers
2026-04-04  3:43             ` [PATCH v6 10/25] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-04-04  3:43             ` [PATCH v6 11/25] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-04-04  3:43             ` [PATCH v6 12/25] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 13/25] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-04-04  3:43             ` [PATCH v6 14/25] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-04-04  3:43             ` [PATCH v6 15/25] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 16/25] perf inject: Don't pass evsel with sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 17/25] perf kmem: " Ian Rogers
2026-04-04  3:43             ` [PATCH v6 18/25] perf kwork: " Ian Rogers
2026-04-04  3:43             ` [PATCH v6 19/25] perf sched: " Ian Rogers
2026-04-04  3:43             ` [PATCH v6 20/25] perf timechart: " Ian Rogers
2026-04-04  3:43             ` [PATCH v6 21/25] perf trace: " Ian Rogers
2026-04-04  3:43             ` [PATCH v6 22/25] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 23/25] perf script: Don't pass evsel with sample Ian Rogers
2026-04-04  3:43             ` [PATCH v6 24/25] perf s390-sample-raw: Don't pass evsel or its PMU " Ian Rogers
2026-04-04  3:43             ` [PATCH v6 25/25] perf evsel: Don't pass evsel " Ian Rogers
2026-04-06  6:11             ` [PATCH v6 00/25] perf tool: Add evsel to perf_sample Namhyung Kim
2026-04-06 17:50               ` Namhyung Kim
2026-04-08  7:25                 ` [PATCH v7 00/23] " Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 01/23] perf tool: Remove evsel from tool APIs that pass the sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 02/23] perf kvm: Don't pass evsel with sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 03/23] perf evsel: Refactor evsel tracepoint sample accessors perf_sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 04/23] perf kwork: Duplicate IRQ name in irq_work_init Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 05/23] perf trace: Don't pass evsel with sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 06/23] perf callchain: Don't pass evsel and sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 07/23] perf lock: Only pass sample to handlers Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 08/23] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 09/23] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 10/23] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 11/23] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 12/23] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 13/23] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 14/23] perf inject: Don't pass evsel with sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 15/23] perf kmem: " Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 16/23] perf kwork: " Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 17/23] perf sched: " Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 18/23] perf timechart: " Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 19/23] perf trace: " Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 20/23] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-04-08  7:25                   ` [PATCH v7 21/23] perf script: Don't pass evsel with sample Ian Rogers
2026-04-08  7:26                   ` [PATCH v7 22/23] perf s390-sample-raw: Don't pass evsel or its PMU " Ian Rogers
2026-04-08  7:26                   ` [PATCH v7 23/23] perf evsel: Don't pass evsel " Ian Rogers
2026-04-11  6:56                   ` [PATCH v8 00/29] perf tool: Add evsel to perf_sample Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 01/29] perf sample: Fix documentation typo Ian Rogers
2026-04-11  6:56                     ` Ian Rogers [this message]
2026-04-11  6:56                     ` [PATCH v8 03/29] perf kvm: Don't pass evsel with sample Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 04/29] perf evsel: Refactor evsel tracepoint sample accessors perf_sample Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 05/29] perf trace: Don't pass evsel with sample Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 06/29] perf callchain: Don't pass evsel and sample Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 07/29] perf lock: Only pass sample to handlers Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 08/29] perf lock: Constify trace_lock_handler variables Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 09/29] perf hist: Remove evsel parameter from inc samples functions Ian Rogers
2026-04-11  6:56                     ` [PATCH v8 10/29] perf db-export: Remove evsel from struct export_sample Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 11/29] perf hist: Remove evsel from struct hist_entry_iter Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 12/29] perf report: Directly use sample->evsel to avoid computing from sample->id Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 13/29] perf annotate: Don't pass evsel to add_sample Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 14/29] perf inject: Don't pass evsel with sample Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 15/29] perf kmem: " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 16/29] perf kwork: " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 17/29] perf sched: " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 18/29] perf timechart: " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 19/29] perf trace: " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 20/29] perf evlist: Try to avoid computing evsel from sample Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 21/29] perf script: Don't pass evsel with sample Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 22/29] perf s390-sample-raw: Don't pass evsel or its PMU " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 23/29] perf evsel: Don't pass evsel " Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 24/29] perf kmem: Add bounds checks to tracepoint read values Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 25/29] perf sched: Bounds check CPU in sched switch events Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 26/29] perf timechart: Bounds check CPU Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 27/29] perf evsel: Add bounds checking to trace point raw data accessors Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 28/29] perf kwork: Fix address sanitizer issues Ian Rogers
2026-04-11  6:57                     ` [PATCH v8 29/29] perf kwork: Fix memory management of kwork_work Ian Rogers
2026-04-08  7:30                 ` [PATCH v6 00/25] perf tool: Add evsel to perf_sample Ian Rogers
2026-04-09  1:40                   ` Namhyung Kim

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20260411065718.372240-3-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ajones@ventanamicro.com \
    --cc=ak@linux.intel.com \
    --cc=alex@ghiti.fr \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atrajeev@linux.ibm.com \
    --cc=blakejones@google.com \
    --cc=ctshao@google.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=derek.foreman@collabora.com \
    --cc=dvyukov@google.com \
    --cc=howardchu95@gmail.com \
    --cc=hrishikesh123s@gmail.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=krzysztof.m.lopatowski@gmail.com \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pjw@kernel.org \
    --cc=ravi.bangoria@amd.com \
    --cc=swapnil.sapkal@amd.com \
    --cc=tanze@kylinos.cn \
    --cc=thomas.falcon@intel.com \
    --cc=tianyou.li@intel.com \
    --cc=yujie.liu@intel.com \
    --cc=zhouquan@iscas.ac.cn \
    /path/to/YOUR_REPLY

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

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