Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140961
b: refs/heads/master
c: ac99c58
h: refs/heads/master
i:
  140959: 64f9771
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Mar 16, 2009
1 parent fcdf9f9 commit eb9b5b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 7243f2145a9b06e5cf9a49fc9b8b9a4fff6fb42e
refs/heads/master: ac99c58c9e56967037382e31f865b72b10127965
11 changes: 5 additions & 6 deletions trunk/kernel/trace/trace_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ void start_ftrace_syscalls(void)
unsigned long flags;
struct task_struct *g, *t;

/* Don't enable the flag on the tasks twice */
if (atomic_inc_return(&refcount) != 1)
goto out;
return;

arch_init_ftrace_syscalls();
read_lock_irqsave(&tasklist_lock, flags);
Expand All @@ -107,17 +108,16 @@ void start_ftrace_syscalls(void)
} while_each_thread(g, t);

read_unlock_irqrestore(&tasklist_lock, flags);
out:
atomic_dec(&refcount);
}

void stop_ftrace_syscalls(void)
{
unsigned long flags;
struct task_struct *g, *t;

/* There are perhaps still some users */
if (atomic_dec_return(&refcount))
goto out;
return;

read_lock_irqsave(&tasklist_lock, flags);

Expand All @@ -126,8 +126,6 @@ void stop_ftrace_syscalls(void)
} while_each_thread(g, t);

read_unlock_irqrestore(&tasklist_lock, flags);
out:
atomic_inc(&refcount);
}

void ftrace_syscall_enter(struct pt_regs *regs)
Expand Down Expand Up @@ -201,6 +199,7 @@ static int init_syscall_tracer(struct trace_array *tr)
static void reset_syscall_tracer(struct trace_array *tr)
{
stop_ftrace_syscalls();
tracing_reset_online_cpus(tr);
}

static struct trace_event syscall_enter_event = {
Expand Down

0 comments on commit eb9b5b6

Please sign in to comment.