Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121082
b: refs/heads/master
c: 5aa1ba6
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Nov 11, 2008
1 parent 3c65e6b commit 26ac28a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: e0cb4ebcd9e5b4ddd8216c20f54445c91b1fa4b9
refs/heads/master: 5aa1ba6a6c710e747838a22d798ac97a8b248745
8 changes: 5 additions & 3 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,21 +960,23 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3)
{
struct trace_array *tr = &global_trace;
struct trace_array_cpu *data;
unsigned long flags;
int cpu;
int pc;

if (tracing_disabled)
return;

pc = preempt_count();
preempt_disable_notrace();
local_irq_save(flags);
cpu = raw_smp_processor_id();
data = tr->data[cpu];

if (likely(!atomic_read(&data->disabled)))
if (likely(atomic_inc_return(&data->disabled) == 1))
ftrace_trace_special(tr, data, arg1, arg2, arg3, pc);

preempt_enable_notrace();
atomic_dec(&data->disabled);
local_irq_restore(flags);
}

#ifdef CONFIG_FUNCTION_TRACER
Expand Down

0 comments on commit 26ac28a

Please sign in to comment.