mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2025-03-02 18:36:33 +00:00
Perf: Add event type check in hrtimer hotplug fix
The hrtimer hotplug fix was missing event_type check due to which the check was passing both software clock and hardware cycles. Change-Id: I1d16d0ccc6ce27963ace9d2f3e1e1eab8f8c7d18 Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
This commit is contained in:
parent
6459505bac
commit
35da3bc228
@ -45,6 +45,7 @@ static char *descriptions =
|
||||
"20 msm: perf: set filter bits for cycle counter on krait\n"
|
||||
"21 Perf: Fix hrtimer operation across hotplug\n"
|
||||
"22 Perf: add perf user-mode permissions\n"
|
||||
"23 Perf: Add event type check in hrtimer hotplug fix\n"
|
||||
;
|
||||
|
||||
static ssize_t desc_read(struct file *fp, char __user *buf,
|
||||
|
@ -7481,7 +7481,8 @@ static void __perf_event_stop_swclock(void *__info)
|
||||
struct perf_event *event, *tmp;
|
||||
|
||||
list_for_each_entry_safe(event, tmp, &ctx->event_list, event_entry) {
|
||||
if (event->attr.config == PERF_COUNT_SW_CPU_CLOCK)
|
||||
if (event->attr.config == PERF_COUNT_SW_CPU_CLOCK &&
|
||||
event->attr.type == PERF_TYPE_SOFTWARE)
|
||||
cpu_clock_event_stop(event, 0);
|
||||
}
|
||||
}
|
||||
@ -7529,7 +7530,9 @@ static void perf_event_start_swclock(int cpu)
|
||||
list_for_each_entry_safe(event, tmp, &ctx->event_list,
|
||||
event_entry) {
|
||||
if (event->attr.config ==
|
||||
PERF_COUNT_SW_CPU_CLOCK)
|
||||
PERF_COUNT_SW_CPU_CLOCK &&
|
||||
event->attr.type ==
|
||||
PERF_TYPE_SOFTWARE)
|
||||
cpu_clock_event_start(event, 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user