Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140756
b: refs/heads/master
c: e110e3d
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt committed Feb 17, 2009
1 parent 7a1b85e commit e7575d4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 809dcf29ce4e1723709910878e050bd187617e0e
refs/heads/master: e110e3d1eaa0f9628918be67ddd32e8ad65a2871
28 changes: 28 additions & 0 deletions trunk/kernel/trace/trace_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,42 @@ ftrace_traceoff(unsigned long ip, unsigned long parent_ip, void **data)
tracing_off();
}

static int
ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip,
struct ftrace_hook_ops *ops, void *data);

static struct ftrace_hook_ops traceon_hook_ops = {
.func = ftrace_traceon,
.print = ftrace_trace_onoff_print,
};

static struct ftrace_hook_ops traceoff_hook_ops = {
.func = ftrace_traceoff,
.print = ftrace_trace_onoff_print,
};

static int
ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip,
struct ftrace_hook_ops *ops, void *data)
{
char str[KSYM_SYMBOL_LEN];
long count = (long)data;

kallsyms_lookup(ip, NULL, NULL, NULL, str);
seq_printf(m, "%s:", str);

if (ops == &traceon_hook_ops)
seq_printf(m, "traceon");
else
seq_printf(m, "traceoff");

if (count != -1)
seq_printf(m, ":count=%ld", count);
seq_putc(m, '\n');

return 0;
}

static int
ftrace_trace_onoff_unreg(char *glob, char *cmd, char *param)
{
Expand Down

0 comments on commit e7575d4

Please sign in to comment.