Skip to content

Commit a64b2c0

Browse files
Ravi Bangoriarostedt
authored andcommitted
trace_uprobe: Simplify probes_seq_show()
Simplify probes_seq_show() function. No change in output before and after patch. Link: http://lkml.kernel.org/r/[email protected] Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Ravi Bangoria <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 18d45b1 commit a64b2c0

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

kernel/trace/trace_uprobe.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -602,24 +602,9 @@ static int probes_seq_show(struct seq_file *m, void *v)
602602
char c = is_ret_probe(tu) ? 'r' : 'p';
603603
int i;
604604

605-
seq_printf(m, "%c:%s/%s", c, tu->tp.call.class->system,
606-
trace_event_name(&tu->tp.call));
607-
seq_printf(m, " %s:", tu->filename);
608-
609-
/* Don't print "0x (null)" when offset is 0 */
610-
if (tu->offset) {
611-
seq_printf(m, "0x%0*lx", (int)(sizeof(void *) * 2), tu->offset);
612-
} else {
613-
switch (sizeof(void *)) {
614-
case 4:
615-
seq_printf(m, "0x00000000");
616-
break;
617-
case 8:
618-
default:
619-
seq_printf(m, "0x0000000000000000");
620-
break;
621-
}
622-
}
605+
seq_printf(m, "%c:%s/%s %s:0x%0*lx", c, tu->tp.call.class->system,
606+
trace_event_name(&tu->tp.call), tu->filename,
607+
(int)(sizeof(void *) * 2), tu->offset);
623608

624609
for (i = 0; i < tu->tp.nr_args; i++)
625610
seq_printf(m, " %s=%s", tu->tp.args[i].name, tu->tp.args[i].comm);

0 commit comments

Comments
 (0)