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:
committed by
Stephen Boyd
parent
d1504fec5f
commit
b3e662e5d0
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user