uprobes/tracing: Kill the pointless local_save_flags/preempt_count calls
authorOleg Nesterov <oleg@redhat.com>
Thu, 28 Mar 2013 18:19:11 +0000 (19:19 +0100)
committerOleg Nesterov <oleg@redhat.com>
Sat, 13 Apr 2013 13:32:00 +0000 (15:32 +0200)
uprobe_trace_func() is never called with irqs or preemption
disabled, no need to ask preempt_count() or local_save_flags().

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

index 8e009016e4ba5621acf712f2522674bd0fff056d..43d258db998efcf151498c9e23446d58b7ef5ad2 100644 (file)
@@ -492,17 +492,13 @@ static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
        struct ring_buffer_event *event;
        struct ring_buffer *buffer;
        u8 *data;
-       int size, i, pc;
-       unsigned long irq_flags;
+       int size, i;
        struct ftrace_event_call *call = &tu->call;
 
-       local_save_flags(irq_flags);
-       pc = preempt_count();
-
        size = sizeof(*entry) + tu->size;
 
        event = trace_current_buffer_lock_reserve(&buffer, call->event.type,
-                                                 size, irq_flags, pc);
+                                                 size, 0, 0);
        if (!event)
                return 0;
 
@@ -513,7 +509,7 @@ static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
                call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);
 
        if (!filter_current_check_discard(buffer, call, entry, event))
-               trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
+               trace_buffer_unlock_commit(buffer, event, 0, 0);
 
        return 0;
 }