Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145986
b: refs/heads/master
c: 597af81
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Apr 7, 2009
1 parent 0343b03 commit 2997b65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 5452af664f6fba26b80eb2c8c4ceae2999d5cf56
refs/heads/master: 597af81537654097b67fd7a0c92775e66d4a86fe
14 changes: 7 additions & 7 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3092,7 +3092,7 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,

#ifdef CONFIG_FUNCTION_GRAPH_TRACER

static atomic_t ftrace_graph_active;
static int ftrace_graph_active;
static struct notifier_block ftrace_suspend_notifier;

int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace)
Expand Down Expand Up @@ -3244,18 +3244,18 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,
mutex_lock(&ftrace_lock);

/* we currently allow only one tracer registered at a time */
if (atomic_read(&ftrace_graph_active)) {
if (ftrace_graph_active) {
ret = -EBUSY;
goto out;
}

ftrace_suspend_notifier.notifier_call = ftrace_suspend_notifier_call;
register_pm_notifier(&ftrace_suspend_notifier);

atomic_inc(&ftrace_graph_active);
ftrace_graph_active++;
ret = start_graph_tracing();
if (ret) {
atomic_dec(&ftrace_graph_active);
ftrace_graph_active--;
goto out;
}

Expand All @@ -3273,10 +3273,10 @@ void unregister_ftrace_graph(void)
{
mutex_lock(&ftrace_lock);

if (!unlikely(atomic_read(&ftrace_graph_active)))
if (unlikely(!ftrace_graph_active))
goto out;

atomic_dec(&ftrace_graph_active);
ftrace_graph_active--;
unregister_trace_sched_switch(ftrace_graph_probe_sched_switch);
ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub;
ftrace_graph_entry = ftrace_graph_entry_stub;
Expand All @@ -3290,7 +3290,7 @@ void unregister_ftrace_graph(void)
/* Allocate a return stack for newly created task */
void ftrace_graph_init_task(struct task_struct *t)
{
if (atomic_read(&ftrace_graph_active)) {
if (ftrace_graph_active) {
t->ret_stack = kmalloc(FTRACE_RETFUNC_DEPTH
* sizeof(struct ftrace_ret_stack),
GFP_KERNEL);
Expand Down

0 comments on commit 2997b65

Please sign in to comment.