mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
perf: periodic: add cpumask processing
Cpumask is used to limit the processors being profiled on a multi-core processor. Cpumask was being set but not being used. Add support to use cpumask when creating a counter. Change-Id: I3a3aab581e9e925507da5d319328ed6a2460328f Signed-off-by: Neil Leeder <nleeder@codeaurora.org> (cherry picked from commit fb587021e93b049c9419ea08f50fe431fa505548)
This commit is contained in:
parent
d1504fec5f
commit
b3e662e5d0
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
|
||||
* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -194,6 +194,8 @@ static int create_perf_counter(struct perf_setup_s *p)
|
|||
if (p == NULL)
|
||||
return PERF_PERIODIC_ERROR;
|
||||
for (cpu = 0; cpu < cpus->nr; cpu++) {
|
||||
if (((1 << cpu) & cpumask) == 0)
|
||||
continue;
|
||||
p->perf_fd[cpu] = sys_perf_event_open(p->attr, target_pid, cpu,
|
||||
-1, 0);
|
||||
if (p->perf_fd[cpu] < 0)
|
||||
|
|
Loading…
Reference in a new issue