mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 13:11:45 +00:00
uprobes/tracing: Kill the pointless task_pt_regs() calls
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>
This commit is contained in:
parent
decc6bfb49
commit
07720b63a9
@ -507,7 +507,7 @@ static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
entry = ring_buffer_event_data(event);
|
entry = ring_buffer_event_data(event);
|
||||||
entry->ip = instruction_pointer(task_pt_regs(current));
|
entry->ip = instruction_pointer(regs);
|
||||||
data = (u8 *)&entry[1];
|
data = (u8 *)&entry[1];
|
||||||
for (i = 0; i < tu->nr_args; i++)
|
for (i = 0; i < tu->nr_args; i++)
|
||||||
call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);
|
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)
|
if (!entry)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
entry->ip = instruction_pointer(task_pt_regs(current));
|
entry->ip = instruction_pointer(regs);
|
||||||
data = (u8 *)&entry[1];
|
data = (u8 *)&entry[1];
|
||||||
for (i = 0; i < tu->nr_args; i++)
|
for (i = 0; i < tu->nr_args; i++)
|
||||||
call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);
|
call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user