diff options
| author | Will Deacon <[email protected]> | 2012-06-08 15:16:04 +0000 |
|---|---|---|
| committer | Robert Richter <[email protected]> | 2012-06-21 14:15:11 +0000 |
| commit | e734568b675c985db2026848fefaac01c22977a5 (patch) | |
| tree | 75970cb2a9e8fffc98290e3f9f653f964a164a39 /tools/perf/util/trace-event-scripting.c | |
| parent | Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
| download | kernel-e734568b675c985db2026848fefaac01c22977a5.tar.gz kernel-e734568b675c985db2026848fefaac01c22977a5.zip | |
oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array
The OProfile perf backend uses a static array to keep track of the
perf events on the system. When compiling with CONFIG_CPUMASK_OFFSTACK=y
&& SMP, nr_cpumask_bits is not a compile-time constant and the build
will fail with:
oprofile_perf.c:28: error: variably modified 'perf_events' at file scope
This patch uses NR_CPUs instead of nr_cpumask_bits for the array
initialisation. If this causes space problems in the future, we can
always move to dynamic allocation for the events array.
Cc: Matt Fleming <[email protected]>
Reported-by: Russell King - ARM Linux <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Cc: <[email protected]> # v2.6.37+
Signed-off-by: Robert Richter <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions
