From 88f2d7fbab4ceba14946cb86c018bc8a2025e876 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 25 Jul 2011 12:42:27 -0400 Subject: locking: trace system call entry/exit cost --- litmus/locking.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'litmus/locking.c') diff --git a/litmus/locking.c b/litmus/locking.c index 728b56835cf7..cfbc1ba59217 100644 --- a/litmus/locking.c +++ b/litmus/locking.c @@ -1,3 +1,5 @@ +#include +#include #include #ifdef CONFIG_LITMUS_LOCKING @@ -69,6 +71,11 @@ asmlinkage long sys_litmus_lock(int lock_od) struct od_table_entry* entry; struct litmus_lock* l; + if (has_control_page(current)) + TS_SYSCALL_IN_START(&get_control_page(current)->ts_syscall_start); + + TS_SYSCALL_IN_END; + TS_LOCK_START; entry = get_entry_for_od(lock_od); @@ -82,6 +89,8 @@ asmlinkage long sys_litmus_lock(int lock_od) * this into account when computing overheads. */ TS_UNLOCK_END; + TS_SYSCALL_OUT_START; + return err; } @@ -91,6 +100,11 @@ asmlinkage long sys_litmus_unlock(int lock_od) struct od_table_entry* entry; struct litmus_lock* l; + if (has_control_page(current)) + TS_SYSCALL_IN_START(&get_control_page(current)->ts_syscall_start); + + TS_SYSCALL_IN_END; + TS_UNLOCK_START; entry = get_entry_for_od(lock_od); @@ -104,6 +118,8 @@ asmlinkage long sys_litmus_unlock(int lock_od) * account when computing overheads. */ TS_UNLOCK_END; + TS_SYSCALL_OUT_START; + return err; } -- cgit v1.2.2