perf, trace: Remove superfluous rcu_read_lock()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 21 May 2010 13:13:59 +0000 (15:13 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Jun 2010 09:12:33 +0000 (11:12 +0200)
__DO_TRACE() already calls the callbacks under rcu_read_lock_sched(),
which is sufficient for our needs, avoid doing it again.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c

index 4bd3b597bcca278d6aca6f763c8a8760cad9eaa4..b39bec346e806e3ba4e003d69c5b46449d32e432 100644 (file)
@@ -4613,12 +4613,10 @@ void perf_tp_event(u64 addr, u64 count, void *record, int entry_size,
        perf_sample_data_init(&data, addr);
        data.raw = &raw;
 
-       rcu_read_lock();
        hlist_for_each_entry_rcu(event, node, head, hlist_entry) {
                if (perf_tp_event_match(event, &data, regs))
                        perf_swevent_add(event, count, 1, &data, regs);
        }
-       rcu_read_unlock();
 
        perf_swevent_put_recursion_context(rctx);
 }