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

Commit 3ae3c1aa authored by Neil Leeder's avatar Neil Leeder Committed by Stephen Boyd
Browse files

Perf: Support sw events across hotplug



When CPUs are hotplugged off and on, let the various
sw events continue after the hotplug.

Change-Id: Id1aaf30c459c9cf7c9c38967f9ccad56d4062fd3
Signed-off-by: default avatarNeil Leeder <nleeder@codeaurora.org>
parent 0778b03a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ static char *descriptions =
	" 1 Perf: port perf-events to 3.10 kernel\n"
	" 2 Perf: keep events across hotplug\n"
	" 3 Perf: bring CPU online if needed when disabling irq\n"
	" 4 Perf: Support sw events across hotplug\n"
;

static ssize_t desc_read(struct file *fp, char __user *buf,
+4 −0
Original line number Diff line number Diff line
@@ -5485,6 +5485,7 @@ static struct pmu perf_swevent = {
	.read		= perf_swevent_read,

	.event_idx	= perf_swevent_event_idx,
	.events_across_hotplug = 1,
};

#ifdef CONFIG_EVENT_TRACING
@@ -5604,6 +5605,7 @@ static struct pmu perf_tracepoint = {
	.read		= perf_swevent_read,

	.event_idx	= perf_swevent_event_idx,
	.events_across_hotplug = 1,
};

static inline void perf_tp_register(void)
@@ -5831,6 +5833,7 @@ static struct pmu perf_cpu_clock = {
	.read		= cpu_clock_event_read,

	.event_idx	= perf_swevent_event_idx,
	.events_across_hotplug = 1,
};

/*
@@ -5911,6 +5914,7 @@ static struct pmu perf_task_clock = {
	.read		= task_clock_event_read,

	.event_idx	= perf_swevent_event_idx,
	.events_across_hotplug = 1,
};

static void perf_pmu_nop_void(struct pmu *pmu)
+1 −0
Original line number Diff line number Diff line
@@ -646,6 +646,7 @@ static struct pmu perf_breakpoint = {
	.read		= hw_breakpoint_pmu_read,

	.event_idx	= hw_breakpoint_event_idx,
	.events_across_hotplug = 1,
};

int __init init_hw_breakpoint(void)