[PATCH 1/5] ptrace: remove incorrect unlikelys

Steven Rostedt
2009-03-25T05:21:30Z

[-- Attachment #1: 0001-ptrace-remove-incorrect-unlikelys.patch --]
[-- Type: text/plain, Size: 1409 bytes --]

From: Steven Rostedt <rostedt@goodmis.org>

Impact: clean up

Accounding to the annotated branch profiler, the unlikelys used by
ptrace is incorrect every time.

correct incorrect % Function File Line
------- --------- - -------- ---- ----

0 24176 100 syscall_trace_leave ptrace.c 1444
0 21478 100 syscall_trace_enter ptrace.c 1424

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
arch/x86/kernel/ptrace.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 06ca07f..74a16db 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1421,7 +1421,7 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs)
tracehook_report_syscall_entry(regs))
ret = -1L;

- if (unlikely(current->audit_context)) {
+ if (current->audit_context) {
if (IS_IA32)
audit_syscall_entry(AUDIT_ARCH_I386,
regs->orig_ax,
@@ -1441,7 +1441,7 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs)

asmregparm void syscall_trace_leave(struct pt_regs *regs)
{
- if (unlikely(current->audit_context))
+ if (current->audit_context)
audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax);

if (test_thread_flag(TIF_SYSCALL_TRACE))
--
1.6.2

--