perf: Drop unappropriate tests on arch callchains
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 29 Jun 2010 16:08:13 +0000 (18:08 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Wed, 18 Aug 2010 23:29:35 +0000 (01:29 +0200)
Drop the TASK_RUNNING test on user tasks for callchains as
this check doesn't seem to make any sense.

Also remove the tests for !current that is not supposed to
happen and current->pid as this should be handled at the
generic level, with exclude_idle attribute.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: David Miller <davem@davemloft.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Borislav Petkov <bp@amd64.org>
arch/arm/kernel/perf_event.c
arch/sh/kernel/perf_callchain.c
arch/x86/kernel/cpu/perf_event.c

index 417c392ddf1cb55066fa5f99e83e77514bd89901..fdcb0be47df1926ead670f4a998edfd7592f6b5e 100644 (file)
@@ -3107,12 +3107,6 @@ perf_do_callchain(struct pt_regs *regs,
 
        is_user = user_mode(regs);
 
-       if (!current || !current->pid)
-               return;
-
-       if (is_user && current->state != TASK_RUNNING)
-               return;
-
        if (!is_user)
                perf_callchain_kernel(regs, entry);
 
index a9dd3abde28e3f45bbd7d7654e8717c13aed8f34..1d6dbce7a3bc18b71e0cf7ae8dcb4f228bc82207 100644 (file)
@@ -68,9 +68,6 @@ perf_do_callchain(struct pt_regs *regs, struct perf_callchain_entry *entry)
 
        is_user = user_mode(regs);
 
-       if (is_user && current->state != TASK_RUNNING)
-               return;
-
        /*
         * Only the kernel side is implemented for now.
         */
index f2da20fda02ddf6fcd449a88ba399fe4ed44af2a..4a4d191f94924c4ae18e857386eb8de299ba80e7 100644 (file)
@@ -1703,9 +1703,6 @@ perf_do_callchain(struct pt_regs *regs, struct perf_callchain_entry *entry)
 
        is_user = user_mode(regs);
 
-       if (is_user && current->state != TASK_RUNNING)
-               return;
-
        if (!is_user)
                perf_callchain_kernel(regs, entry);