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>
This commit is contained in:

committed by
Steven Rostedt

parent
ccb469a198
commit
a7603ff4b5
@@ -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))
|
||||
|
Reference in New Issue
Block a user