Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116579
b: refs/heads/master
c: 0a37605
h: refs/heads/master
i:
  116577: 49e51c0
  116575: ea8c225
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 14, 2008
1 parent 73e2126 commit aabd184
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4b2b8866121bd06d5f3d9de0f79a04339ffa252
refs/heads/master: 0a37605c2261a06d8cafc62dee11374ad676c8c4
14 changes: 0 additions & 14 deletions trunk/arch/x86/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -1153,20 +1153,6 @@ ENDPROC(xen_failsafe_callback)
#ifdef CONFIG_DYNAMIC_FTRACE

ENTRY(mcount)
pushl %eax
pushl %ecx
pushl %edx
movl 0xc(%esp), %eax
subl $MCOUNT_INSN_SIZE, %eax

.globl mcount_call
mcount_call:
call ftrace_stub

popl %edx
popl %ecx
popl %eax

ret
END(mcount)

Expand Down
26 changes: 0 additions & 26 deletions trunk/arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,6 @@
#ifdef CONFIG_FTRACE
#ifdef CONFIG_DYNAMIC_FTRACE
ENTRY(mcount)

subq $0x38, %rsp
movq %rax, (%rsp)
movq %rcx, 8(%rsp)
movq %rdx, 16(%rsp)
movq %rsi, 24(%rsp)
movq %rdi, 32(%rsp)
movq %r8, 40(%rsp)
movq %r9, 48(%rsp)

movq 0x38(%rsp), %rdi
subq $MCOUNT_INSN_SIZE, %rdi

.globl mcount_call
mcount_call:
call ftrace_stub

movq 48(%rsp), %r9
movq 40(%rsp), %r8
movq 32(%rsp), %rdi
movq 24(%rsp), %rsi
movq 16(%rsp), %rdx
movq 8(%rsp), %rcx
movq (%rsp), %rax
addq $0x38, %rsp

retq
END(mcount)

Expand Down
14 changes: 2 additions & 12 deletions trunk/arch/x86/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,8 @@ notrace int ftrace_update_ftrace_func(ftrace_func_t func)

notrace int ftrace_mcount_set(unsigned long *data)
{
unsigned long ip = (long)(&mcount_call);
unsigned long *addr = data;
unsigned char old[MCOUNT_INSN_SIZE], *new;

/*
* Replace the mcount stub with a pointer to the
* ip recorder function.
*/
memcpy(old, &mcount_call, MCOUNT_INSN_SIZE);
new = ftrace_call_replace(ip, *addr);
*addr = ftrace_modify_code(ip, old, new);

/* mcount is initialized as a nop */
*data = 0;
return 0;
}

Expand Down

0 comments on commit aabd184

Please sign in to comment.