summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_irqsoff.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-08-06 16:24:11 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 00:34:43 -0400
commita7603ff4b5f7e26e67af82a4c3d05eeeb8d7b160 (patch)
tree2d348aeb190cf6c7ba43f97419b291251d6e04c5 /kernel/trace/trace_irqsoff.c
parentccb469a198cffac94a7eea0b69f715f06e2ddf15 (diff)
downloadop-kernel-dev-a7603ff4b5f7e26e67af82a4c3d05eeeb8d7b160.zip
op-kernel-dev-a7603ff4b5f7e26e67af82a4c3d05eeeb8d7b160.tar.gz
tracing: Replace the static global per_cpu arrays with allocated per_cpu
The global and max-tr currently use static per_cpu arrays for the CPU data descriptors. But in order to get new allocated trace_arrays, they need to be allocated per_cpu arrays. Instead of using the static arrays, switch the global and max-tr to use allocated data. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_irqsoff.c')
-rw-r--r--kernel/trace/trace_irqsoff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
index b3cf6bf..9b52f9c 100644
--- a/kernel/trace/trace_irqsoff.c
+++ b/kernel/trace/trace_irqsoff.c
@@ -121,7 +121,7 @@ static int func_prolog_dec(struct trace_array *tr,
if (!irqs_disabled_flags(*flags))
return 0;
- *data = tr->data[cpu];
+ *data = per_cpu_ptr(tr->data, cpu);
disabled = atomic_inc_return(&(*data)->disabled);
if (likely(disabled == 1))
@@ -380,7 +380,7 @@ start_critical_timing(unsigned long ip, unsigned long parent_ip)
if (per_cpu(tracing_cpu, cpu))
return;
- data = tr->data[cpu];
+ data = per_cpu_ptr(tr->data, cpu);
if (unlikely(!data) || atomic_read(&data->disabled))
return;
@@ -418,7 +418,7 @@ stop_critical_timing(unsigned long ip, unsigned long parent_ip)
if (!tracer_enabled)
return;
- data = tr->data[cpu];
+ data = per_cpu_ptr(tr->data, cpu);
if (unlikely(!data) ||
!data->critical_start || atomic_read(&data->disabled))
OpenPOWER on IntegriCloud