Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121209
b: refs/heads/master
c: e53a631
h: refs/heads/master
i:
  121207: 34a87c6
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Nov 26, 2008
1 parent 403e42b commit 500a5f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 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: 5a45cfe1c64862e8cd3b0d79d7c4ba71c3118915
refs/heads/master: e53a6319cca69111c1643dc9f18f4465d7f1cbf0
22 changes: 2 additions & 20 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ static int ftrace_pid_trace = -1;
/* Quick disabling of function tracer. */
int function_trace_stop;

/* By default, current tracing type is normal tracing. */
enum ftrace_tracing_type_t ftrace_tracing_type = FTRACE_TYPE_ENTER;

/*
* ftrace_disabled is set when an anomaly is discovered.
* ftrace_disabled is much stronger than ftrace_enabled.
Expand Down Expand Up @@ -1576,15 +1573,9 @@ int register_ftrace_function(struct ftrace_ops *ops)

mutex_lock(&ftrace_sysctl_lock);

if (ftrace_tracing_type == FTRACE_TYPE_RETURN) {
ret = -EBUSY;
goto out;
}

ret = __register_ftrace_function(ops);
ftrace_startup(0);

out:
mutex_unlock(&ftrace_sysctl_lock);
return ret;
}
Expand Down Expand Up @@ -1731,23 +1722,16 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,

mutex_lock(&ftrace_sysctl_lock);

/*
* Don't launch return tracing if normal function
* tracing is already running.
*/
if (ftrace_trace_function != ftrace_stub) {
ret = -EBUSY;
goto out;
}
atomic_inc(&ftrace_graph_active);
ret = start_graph_tracing();
if (ret) {
atomic_dec(&ftrace_graph_active);
goto out;
}
ftrace_tracing_type = FTRACE_TYPE_RETURN;

ftrace_graph_return = retfunc;
ftrace_graph_entry = entryfunc;

ftrace_startup(FTRACE_START_FUNC_RET);

out:
Expand All @@ -1763,8 +1747,6 @@ void unregister_ftrace_graph(void)
ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub;
ftrace_graph_entry = (trace_func_graph_ent_t)ftrace_stub;
ftrace_shutdown(FTRACE_STOP_FUNC_RET);
/* Restore normal tracing type */
ftrace_tracing_type = FTRACE_TYPE_ENTER;

mutex_unlock(&ftrace_sysctl_lock);
}
Expand Down

0 comments on commit 500a5f4

Please sign in to comment.