Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100500
b: refs/heads/master
c: c5f888c
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Thomas Gleixner committed May 23, 2008
1 parent 74d3c6b commit 2fccdd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d9493c90f8e6e1b164aede3814010a290161abb
refs/heads/master: c5f888cae49dfe3e86d9d1e0dab2b63ceb057be3
19 changes: 10 additions & 9 deletions trunk/kernel/trace/trace_irqsoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ start_critical_timing(unsigned long ip, unsigned long parent_ip)
if (likely(!tracer_enabled))
return;

if (__get_cpu_var(tracing_cpu))
cpu = raw_smp_processor_id();

if (per_cpu(tracing_cpu, cpu))
return;

cpu = raw_smp_processor_id();
data = tr->data[cpu];

if (unlikely(!data) || unlikely(!head_page(data)) ||
atomic_read(&data->disabled))
if (unlikely(!data) || atomic_read(&data->disabled))
return;

atomic_inc(&data->disabled);
Expand All @@ -225,7 +225,7 @@ start_critical_timing(unsigned long ip, unsigned long parent_ip)

trace_function(tr, data, ip, parent_ip, flags);

__get_cpu_var(tracing_cpu) = 1;
per_cpu(tracing_cpu, cpu) = 1;

atomic_dec(&data->disabled);
}
Expand All @@ -238,23 +238,24 @@ stop_critical_timing(unsigned long ip, unsigned long parent_ip)
struct trace_array_cpu *data;
unsigned long flags;

cpu = raw_smp_processor_id();
/* Always clear the tracing cpu on stopping the trace */
if (unlikely(__get_cpu_var(tracing_cpu)))
__get_cpu_var(tracing_cpu) = 0;
if (unlikely(per_cpu(tracing_cpu, cpu)))
per_cpu(tracing_cpu, cpu) = 0;
else
return;

if (!tracer_enabled)
return;

cpu = raw_smp_processor_id();
data = tr->data[cpu];

if (unlikely(!data) || unlikely(!head_page(data)) ||
!data->critical_start || atomic_read(&data->disabled))
return;

atomic_inc(&data->disabled);

local_save_flags(flags);
trace_function(tr, data, ip, parent_ip, flags);
check_critical_timing(tr, data, parent_ip ? : ip, cpu);
Expand Down Expand Up @@ -376,7 +377,7 @@ static void stop_irqsoff_tracer(struct trace_array *tr)
static void __irqsoff_tracer_init(struct trace_array *tr)
{
irqsoff_trace = tr;
/* make sure that the tracer is visibel */
/* make sure that the tracer is visible */
smp_wmb();

if (tr->ctrl)
Expand Down

0 comments on commit 2fccdd1

Please sign in to comment.