lkml.org 
[lkml]   [2007]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Performance Stats: Kernel patch
On Mon, 09 Apr 2007 18:22:22 +0400
Maxim Uvarov <muvarov@ru.mvista.com> wrote:



> --- linux-2.6.21-rc5.orig/arch/x86_64/kernel/entry.S
> +++ linux-2.6.21-rc5/arch/x86_64/kernel/entry.S
> @@ -236,6 +236,11 @@ ENTRY(system_call)
> movq %r10,%rcx
> call *sys_call_table(,%rax,8) # XXX: rip relative
> movq %rax,RAX-ARGOFFSET(%rsp)
> +#ifdef CONFIG_THREAD_PERF_STAT_SYSC
> + GET_THREAD_INFO(%rcx)
> + addq $1, threadinfo_sysc_cnt(%rcx) # Increment syscalls counter
> +#endif /* CONFIG_THREAD_PERF_STAT_SYSC */
> +

Please reorganize the code so that you dont duplicate GET_THREAD_INFO() stuff
You can do this for example before calling the syscall, not after.

ja badsys
+#ifdef CONFIG_THREAD_PERF_STAT_SYSC
+ incq threadinfo_sysc_cnt(%rcx) # Increment syscalls counter
+#endif /* CONFIG_THREAD_PERF_STAT_SYSC */
movq %r10,%rcx
call *sys_call_table(,%rax,8) # XXX: rip relative
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-10 11:05    [W:0.293 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site