Skip to content

Commit

Permalink
uprobes/tracing: Kill the pointless task_pt_regs() calls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oleg Nesterov committed Apr 13, 2013
1 parent decc6bf commit 07720b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/trace_uprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 07720b6

Please sign in to comment.