dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch
Steven Rostedt d57c5d51a3 ftrace/x86: Add support for -mfentry to x86_64
If the kernel is compiled with gcc 4.6.0 which supports -mfentry,
then use that instead of mcount.

With mcount, frame pointers are forced with the -pg option and we
get something like:

<can_vma_merge_before>:
       55                      push   %rbp
       48 89 e5                mov    %rsp,%rbp
       53                      push   %rbx
       41 51                   push   %r9
       e8 fe 6a 39 00          callq  ffffffff81483d00 <mcount>
       31 c0                   xor    %eax,%eax
       48 89 fb                mov    %rdi,%rbx
       48 89 d7                mov    %rdx,%rdi
       48 33 73 30             xor    0x30(%rbx),%rsi
       48 f7 c6 ff ff ff f7    test   $0xfffffffff7ffffff,%rsi

With -mfentry, frame pointers are no longer forced and the call looks
like this:

<can_vma_merge_before>:
       e8 33 af 37 00          callq  ffffffff81461b40 <__fentry__>
       53                      push   %rbx
       48 89 fb                mov    %rdi,%rbx
       31 c0                   xor    %eax,%eax
       48 89 d7                mov    %rdx,%rdi
       41 51                   push   %r9
       48 33 73 30             xor    0x30(%rbx),%rsi
       48 f7 c6 ff ff ff f7    test   $0xfffffffff7ffffff,%rsi

This adds the ftrace hook at the beginning of the function before a
frame is set up, and allows the function callbacks to be able to access
parameters. As kprobes now can use function tracing (at least on x86)
this speeds up the kprobe hooks that are at the beginning of the
function.

Link: http://lkml.kernel.org/r/20120807194100.130477900@goodmis.org

Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-23 11:26:36 -04:00
..
alpha ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
arm ARM: arm-soc Marvell Orion device-tree updates 2012-08-02 11:50:24 -07:00
avr32 ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2012-08-03 10:52:41 -07:00
c6x Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-07-24 10:01:50 -07:00
cris ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
frv Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-30 17:25:34 -07:00
h8300 ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
hexagon Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-07-30 11:24:53 -07:00
ia64 ACPI: Only count valid srat memory structures 2012-08-03 00:15:53 -04:00
m32r ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION 2012-07-30 17:25:21 -07:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2012-08-03 10:52:41 -07:00
microblaze Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2012-08-03 10:52:41 -07:00
mips Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-08-01 16:47:15 -07:00
mn10300 Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-30 17:25:34 -07:00
openrisc Remove useless wrappers of asm-generic/rmap.h 2012-06-28 11:29:26 +02:00
parisc PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
powerpc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-08-01 10:26:23 -07:00
s390 Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-31 19:25:39 -07:00
score new helper: signal_delivered() 2012-06-01 12:58:52 -04:00
sh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2012-08-03 10:52:41 -07:00
sparc This patch series contains a major revamp of how we collect entropy 2012-07-31 19:07:42 -07:00
tile memcg: rename config variables 2012-07-31 18:42:43 -07:00
um Merge branch 'for-linus-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-08-01 16:45:02 -07:00
unicore32 PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
x86 ftrace/x86: Add support for -mfentry to x86_64 2012-08-23 11:26:36 -04:00
xtensa xtensa: select generic atomic64_t support 2012-07-31 18:42:39 -07:00
.gitignore
Kconfig perf: Add ability to attach user stack dump to sample 2012-08-10 12:17:58 -03:00