forked from Minki/linux
ee9f8fce99
Add the new ORC unwinder which is enabled by CONFIG_ORC_UNWINDER=y. It plugs into the existing x86 unwinder framework. It relies on objtool to generate the needed .orc_unwind and .orc_unwind_ip sections. For more details on why ORC is used instead of DWARF, see Documentation/x86/orc-unwinder.txt - but the short version is that it's a simplified, fundamentally more robust debugninfo data structure, which also allows up to two orders of magnitude faster lookups than the DWARF unwinder - which matters to profiling workloads like perf. Thanks to Andy Lutomirski for the performance improvement ideas: splitting the ORC unwind table into two parallel arrays and creating a fast lookup table to search a subset of the unwind table. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/0a6cbfb40f8da99b7a45a1a8302dc6aef16ec812.1500938583.git.jpoimboe@redhat.com [ Extended the changelog. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
74 lines
2.0 KiB
C
74 lines
2.0 KiB
C
#ifndef _ASM_X86_MODULE_H
|
|
#define _ASM_X86_MODULE_H
|
|
|
|
#include <asm-generic/module.h>
|
|
#include <asm/orc_types.h>
|
|
|
|
struct mod_arch_specific {
|
|
#ifdef CONFIG_ORC_UNWINDER
|
|
unsigned int num_orcs;
|
|
int *orc_unwind_ip;
|
|
struct orc_entry *orc_unwind;
|
|
#endif
|
|
};
|
|
|
|
#ifdef CONFIG_X86_64
|
|
/* X86_64 does not define MODULE_PROC_FAMILY */
|
|
#elif defined CONFIG_M486
|
|
#define MODULE_PROC_FAMILY "486 "
|
|
#elif defined CONFIG_M586
|
|
#define MODULE_PROC_FAMILY "586 "
|
|
#elif defined CONFIG_M586TSC
|
|
#define MODULE_PROC_FAMILY "586TSC "
|
|
#elif defined CONFIG_M586MMX
|
|
#define MODULE_PROC_FAMILY "586MMX "
|
|
#elif defined CONFIG_MCORE2
|
|
#define MODULE_PROC_FAMILY "CORE2 "
|
|
#elif defined CONFIG_MATOM
|
|
#define MODULE_PROC_FAMILY "ATOM "
|
|
#elif defined CONFIG_M686
|
|
#define MODULE_PROC_FAMILY "686 "
|
|
#elif defined CONFIG_MPENTIUMII
|
|
#define MODULE_PROC_FAMILY "PENTIUMII "
|
|
#elif defined CONFIG_MPENTIUMIII
|
|
#define MODULE_PROC_FAMILY "PENTIUMIII "
|
|
#elif defined CONFIG_MPENTIUMM
|
|
#define MODULE_PROC_FAMILY "PENTIUMM "
|
|
#elif defined CONFIG_MPENTIUM4
|
|
#define MODULE_PROC_FAMILY "PENTIUM4 "
|
|
#elif defined CONFIG_MK6
|
|
#define MODULE_PROC_FAMILY "K6 "
|
|
#elif defined CONFIG_MK7
|
|
#define MODULE_PROC_FAMILY "K7 "
|
|
#elif defined CONFIG_MK8
|
|
#define MODULE_PROC_FAMILY "K8 "
|
|
#elif defined CONFIG_MELAN
|
|
#define MODULE_PROC_FAMILY "ELAN "
|
|
#elif defined CONFIG_MCRUSOE
|
|
#define MODULE_PROC_FAMILY "CRUSOE "
|
|
#elif defined CONFIG_MEFFICEON
|
|
#define MODULE_PROC_FAMILY "EFFICEON "
|
|
#elif defined CONFIG_MWINCHIPC6
|
|
#define MODULE_PROC_FAMILY "WINCHIPC6 "
|
|
#elif defined CONFIG_MWINCHIP3D
|
|
#define MODULE_PROC_FAMILY "WINCHIP3D "
|
|
#elif defined CONFIG_MCYRIXIII
|
|
#define MODULE_PROC_FAMILY "CYRIXIII "
|
|
#elif defined CONFIG_MVIAC3_2
|
|
#define MODULE_PROC_FAMILY "VIAC3-2 "
|
|
#elif defined CONFIG_MVIAC7
|
|
#define MODULE_PROC_FAMILY "VIAC7 "
|
|
#elif defined CONFIG_MGEODEGX1
|
|
#define MODULE_PROC_FAMILY "GEODEGX1 "
|
|
#elif defined CONFIG_MGEODE_LX
|
|
#define MODULE_PROC_FAMILY "GEODE "
|
|
#else
|
|
#error unknown processor family
|
|
#endif
|
|
|
|
#ifdef CONFIG_X86_32
|
|
# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_MODULE_H */
|