Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 744a9719 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf evsel: Ditch evsel->handler.data field

Not needed since this cset:

  fcf65bf1: perf evsel: Cache associated event_format

So lets trim this struct a bit.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-j8setslokt0goiwxq9dogzqm@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8a4d0b56
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -106,8 +106,8 @@ static int perf_event__repipe_sample(struct perf_tool *tool,
				     struct perf_evsel *evsel,
				     struct machine *machine)
{
	if (evsel->handler.func) {
		inject_handler f = evsel->handler.func;
	if (evsel->handler) {
		inject_handler f = evsel->handler;
		return f(tool, event, sample, evsel, machine);
	}

@@ -383,11 +383,11 @@ static int __cmd_inject(struct perf_inject *inject)
				if (perf_evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID"))
					return -EINVAL;

				evsel->handler.func = perf_inject__sched_switch;
				evsel->handler = perf_inject__sched_switch;
			} else if (!strcmp(name, "sched:sched_process_exit"))
				evsel->handler.func = perf_inject__sched_process_exit;
				evsel->handler = perf_inject__sched_process_exit;
			else if (!strncmp(name, "sched:sched_stat_", 17))
				evsel->handler.func = perf_inject__sched_stat;
				evsel->handler = perf_inject__sched_stat;
		}
	}

+2 −2
Original line number Diff line number Diff line
@@ -317,8 +317,8 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,

	dump_printf(" ... thread: %s:%d\n", thread__comm_str(thread), thread->tid);

	if (evsel->handler.func != NULL) {
		tracepoint_handler f = evsel->handler.func;
	if (evsel->handler != NULL) {
		tracepoint_handler f = evsel->handler;
		return f(evsel, sample);
	}

+2 −2
Original line number Diff line number Diff line
@@ -819,8 +819,8 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
		return -1;
	}

	if (evsel->handler.func != NULL) {
		tracepoint_handler f = evsel->handler.func;
	if (evsel->handler != NULL) {
		tracepoint_handler f = evsel->handler;
		return f(evsel, sample);
	}

+2 −2
Original line number Diff line number Diff line
@@ -1427,8 +1427,8 @@ static int perf_sched__process_tracepoint_sample(struct perf_tool *tool __maybe_
	evsel->hists.stats.total_period += sample->period;
	hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);

	if (evsel->handler.func != NULL) {
		tracepoint_handler f = evsel->handler.func;
	if (evsel->handler != NULL) {
		tracepoint_handler f = evsel->handler;
		err = f(tool, evsel, sample, machine);
	}

+2 −2
Original line number Diff line number Diff line
@@ -483,8 +483,8 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
	if (sample->cpu > numcpus)
		numcpus = sample->cpu;

	if (evsel->handler.func != NULL) {
		tracepoint_handler f = evsel->handler.func;
	if (evsel->handler != NULL) {
		tracepoint_handler f = evsel->handler;
		return f(evsel, sample);
	}

Loading