uprobes/tracing: Kill the pointless task_pt_regs() calls
authorOleg Nesterov <oleg@redhat.com>
Thu, 28 Mar 2013 17:01:04 +0000 (18:01 +0100)
committerOleg Nesterov <oleg@redhat.com>
Sat, 13 Apr 2013 13:31:59 +0000 (15:31 +0200)
uprobe_trace_func() and uprobe_perf_func() do not need task_pt_regs(),
we already have "struct pt_regs *regs".

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Tested-by: Anton Arapov <anton@redhat.com>
kernel/trace/trace_uprobe.c

index 8dad2a92dee9c9fff297d62edfe72147a1b371e4..af5b7735cebf978353536a84fa734e5f6a1e856f 100644 (file)
@@ -507,7 +507,7 @@ static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
                return 0;
 
        entry = ring_buffer_event_data(event);
-       entry->ip = instruction_pointer(task_pt_regs(current));
+       entry->ip = instruction_pointer(regs);
        data = (u8 *)&entry[1];
        for (i = 0; i < tu->nr_args; i++)
                call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);
@@ -777,7 +777,7 @@ static int uprobe_perf_func(struct trace_uprobe *tu, struct pt_regs *regs)
        if (!entry)
                goto out;
 
-       entry->ip = instruction_pointer(task_pt_regs(current));
+       entry->ip = instruction_pointer(regs);
        data = (u8 *)&entry[1];
        for (i = 0; i < tu->nr_args; i++)
                call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);