forked from Minki/linux
858918b77b
Now that the DWARF unwinder is being used to provide perf callstacks unwinding speed is an issue. It is no longer being used in exceptional circumstances where we don't care about runtime performance, e.g. when panicing, so it makes sense improve performance is possible. With this patch I saw a 42% improvement in unwind time when calling return_address(1). Greater improvements will be seen as the number of levels unwound increases as each unwind is now cheaper. Note that insertion time has doubled but that's just the price we pay for keeping the trees balanced. However, this is a one-time cost for kernel boot/module load and so the improvements in lookup time dominate the extra time we spend keeping the trees balanced. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
#ifndef _ASM_SH_MODULE_H
|
|
#define _ASM_SH_MODULE_H
|
|
|
|
struct mod_arch_specific {
|
|
#ifdef CONFIG_DWARF_UNWINDER
|
|
struct list_head fde_list;
|
|
struct list_head cie_list;
|
|
#endif
|
|
};
|
|
|
|
#ifdef CONFIG_64BIT
|
|
#define Elf_Shdr Elf64_Shdr
|
|
#define Elf_Sym Elf64_Sym
|
|
#define Elf_Ehdr Elf64_Ehdr
|
|
#else
|
|
#define Elf_Shdr Elf32_Shdr
|
|
#define Elf_Sym Elf32_Sym
|
|
#define Elf_Ehdr Elf32_Ehdr
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
|
# ifdef CONFIG_CPU_SH2
|
|
# define MODULE_PROC_FAMILY "SH2LE "
|
|
# elif defined CONFIG_CPU_SH3
|
|
# define MODULE_PROC_FAMILY "SH3LE "
|
|
# elif defined CONFIG_CPU_SH4
|
|
# define MODULE_PROC_FAMILY "SH4LE "
|
|
# elif defined CONFIG_CPU_SH5
|
|
# define MODULE_PROC_FAMILY "SH5LE "
|
|
# else
|
|
# error unknown processor family
|
|
# endif
|
|
#else
|
|
# ifdef CONFIG_CPU_SH2
|
|
# define MODULE_PROC_FAMILY "SH2BE "
|
|
# elif defined CONFIG_CPU_SH3
|
|
# define MODULE_PROC_FAMILY "SH3BE "
|
|
# elif defined CONFIG_CPU_SH4
|
|
# define MODULE_PROC_FAMILY "SH4BE "
|
|
# elif defined CONFIG_CPU_SH5
|
|
# define MODULE_PROC_FAMILY "SH5BE "
|
|
# else
|
|
# error unknown processor family
|
|
# endif
|
|
#endif
|
|
|
|
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
|
|
|
#endif /* _ASM_SH_MODULE_H */
|