tracing: Replace seq_printf by simpler equivalents
Using seq_printf to print a simple string or a single character is a lot more expensive than it needs to be, since seq_puts and seq_putc exist. These patches do seq_printf(m, s) -> seq_puts(m, s) seq_printf(m, "%s", s) -> seq_puts(m, s) seq_printf(m, "%c", c) -> seq_putc(m, c) Subsequent patches will simplify further. Link: http://lkml.kernel.org/r/1415479332-25944-2-git-send-email-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:

کامیت شده توسط
Steven Rostedt

والد
8520dedbbf
کامیت
fa6f0cc751
@@ -826,7 +826,7 @@ static int probes_seq_show(struct seq_file *m, void *v)
|
||||
struct trace_kprobe *tk = v;
|
||||
int i;
|
||||
|
||||
seq_printf(m, "%c", trace_kprobe_is_return(tk) ? 'r' : 'p');
|
||||
seq_putc(m, trace_kprobe_is_return(tk) ? 'r' : 'p');
|
||||
seq_printf(m, ":%s/%s", tk->tp.call.class->system,
|
||||
ftrace_event_name(&tk->tp.call));
|
||||
|
||||
@@ -840,7 +840,7 @@ static int probes_seq_show(struct seq_file *m, void *v)
|
||||
|
||||
for (i = 0; i < tk->tp.nr_args; i++)
|
||||
seq_printf(m, " %s=%s", tk->tp.args[i].name, tk->tp.args[i].comm);
|
||||
seq_printf(m, "\n");
|
||||
seq_putc(m, '\n');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user