Skip to content

Commit

Permalink
perf: Drop unappropriate tests on arch callchains
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frederic Weisbecker committed Aug 18, 2010
1 parent 4694153 commit c1a6593
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 0 additions & 3 deletions arch/sh/kernel/perf_callchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c1a6593

Please sign in to comment.