Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252655
b: refs/heads/master
c: a1cd617
h: refs/heads/master
i:
  252653: b0d4dea
  252651: 178bd3a
  252647: f6dbffa
  252639: 95e1154
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 26, 2011
1 parent 66fb256 commit e206ae2
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 7cbc5b8d4a775a43875a09e29c49a2a8195b5b2d
refs/heads/master: a1cd6173596c6f7d1f0b41ac7d33ecf03c581edc
14 changes: 8 additions & 6 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,12 +1638,12 @@ static void ftrace_startup_enable(int command)
ftrace_run_update_code(command);
}

static void ftrace_startup(struct ftrace_ops *ops, int command)
static int ftrace_startup(struct ftrace_ops *ops, int command)
{
bool hash_enable = true;

if (unlikely(ftrace_disabled))
return;
return -ENODEV;

ftrace_start_up++;
command |= FTRACE_ENABLE_CALLS;
Expand All @@ -1662,6 +1662,8 @@ static void ftrace_startup(struct ftrace_ops *ops, int command)
ftrace_hash_rec_enable(ops, 1);

ftrace_startup_enable(command);

return 0;
}

static void ftrace_shutdown(struct ftrace_ops *ops, int command)
Expand Down Expand Up @@ -2501,7 +2503,7 @@ static void __enable_ftrace_function_probe(void)

ret = __register_ftrace_function(&trace_probe_ops);
if (!ret)
ftrace_startup(&trace_probe_ops, 0);
ret = ftrace_startup(&trace_probe_ops, 0);

ftrace_probe_registered = 1;
}
Expand Down Expand Up @@ -3466,7 +3468,7 @@ device_initcall(ftrace_nodyn_init);
static inline int ftrace_init_dyn_debugfs(struct dentry *d_tracer) { return 0; }
static inline void ftrace_startup_enable(int command) { }
/* Keep as macros so we do not need to define the commands */
# define ftrace_startup(ops, command) do { } while (0)
# define ftrace_startup(ops, command) ({0;})
# define ftrace_shutdown(ops, command) do { } while (0)
# define ftrace_startup_sysctl() do { } while (0)
# define ftrace_shutdown_sysctl() do { } while (0)
Expand Down Expand Up @@ -3799,7 +3801,7 @@ int register_ftrace_function(struct ftrace_ops *ops)

ret = __register_ftrace_function(ops);
if (!ret)
ftrace_startup(ops, 0);
ret = ftrace_startup(ops, 0);


out_unlock:
Expand Down Expand Up @@ -4045,7 +4047,7 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,
ftrace_graph_return = retfunc;
ftrace_graph_entry = entryfunc;

ftrace_startup(&global_ops, FTRACE_START_FUNC_RET);
ret = ftrace_startup(&global_ops, FTRACE_START_FUNC_RET);

out:
mutex_unlock(&ftrace_lock);
Expand Down

0 comments on commit e206ae2

Please sign in to comment.