mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
d2bb076299
If -pg of gcc is enabled with CONFIG_FUNCTION_TRACER=y. a calling to _mcount will be inserted into each kernel function. so, there is a possibility to trace the kernel functions in _mcount. This patch add the MIPS specific _mcount support for static function tracing. by default, ftrace_trace_function is initialized as ftrace_stub(an empty function), so, the default _mcount will introduce very little overhead. after enabling ftrace in user-space, it will jump to a real tracing function and do static function tracing for us. and -ffunction-sections is incompatible with -pg, so, disable it when ftracer is enabled. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Nicholas Mc Guire <der.herr@hofr.at> Cc: zhangfx@lemote.com Cc: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/672/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
58 lines
1.7 KiB
C
58 lines
1.7 KiB
C
/*
|
|
* Export MIPS-specific functions needed for loadable modules.
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 1996, 97, 98, 99, 2000, 01, 03, 04, 05 by Ralf Baechle
|
|
* Copyright (C) 1999, 2000, 01 Silicon Graphics, Inc.
|
|
*/
|
|
#include <linux/interrupt.h>
|
|
#include <linux/module.h>
|
|
#include <asm/checksum.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/ftrace.h>
|
|
|
|
extern void *__bzero(void *__s, size_t __count);
|
|
extern long __strncpy_from_user_nocheck_asm(char *__to,
|
|
const char *__from, long __len);
|
|
extern long __strncpy_from_user_asm(char *__to, const char *__from,
|
|
long __len);
|
|
extern long __strlen_user_nocheck_asm(const char *s);
|
|
extern long __strlen_user_asm(const char *s);
|
|
extern long __strnlen_user_nocheck_asm(const char *s);
|
|
extern long __strnlen_user_asm(const char *s);
|
|
|
|
/*
|
|
* String functions
|
|
*/
|
|
EXPORT_SYMBOL(memset);
|
|
EXPORT_SYMBOL(memcpy);
|
|
EXPORT_SYMBOL(memmove);
|
|
|
|
EXPORT_SYMBOL(kernel_thread);
|
|
|
|
/*
|
|
* Userspace access stuff.
|
|
*/
|
|
EXPORT_SYMBOL(__copy_user);
|
|
EXPORT_SYMBOL(__copy_user_inatomic);
|
|
EXPORT_SYMBOL(__bzero);
|
|
EXPORT_SYMBOL(__strncpy_from_user_nocheck_asm);
|
|
EXPORT_SYMBOL(__strncpy_from_user_asm);
|
|
EXPORT_SYMBOL(__strlen_user_nocheck_asm);
|
|
EXPORT_SYMBOL(__strlen_user_asm);
|
|
EXPORT_SYMBOL(__strnlen_user_nocheck_asm);
|
|
EXPORT_SYMBOL(__strnlen_user_asm);
|
|
|
|
EXPORT_SYMBOL(csum_partial);
|
|
EXPORT_SYMBOL(csum_partial_copy_nocheck);
|
|
EXPORT_SYMBOL(__csum_partial_copy_user);
|
|
|
|
EXPORT_SYMBOL(invalid_pte_table);
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
/* _mcount is defined in arch/mips/kernel/mcount.S */
|
|
EXPORT_SYMBOL(_mcount);
|
|
#endif
|