Re: Performance Stats: Kernel patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 09 Apr 2007 18:22:22 +0400
Maxim Uvarov <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux