diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:56:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:56:46 -0400 |
commit | b0b7065b64fe517b4a50915a1555e8ee98890d64 (patch) | |
tree | 950e7735585a83f5b4efe7a9473b5b42d5ca4f57 /arch/x86 | |
parent | 38df92b8cee936334f686c06df0e5fbb92e252df (diff) | |
parent | d4c4038343510d83727ea922de4435996c26c0c8 (diff) |
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (24 commits)
tracing/urgent: warn in case of ftrace_start_up inbalance
tracing/urgent: fix unbalanced ftrace_start_up
function-graph: add stack frame test
function-graph: disable when both x86_32 and optimize for size are configured
ring-buffer: have benchmark test print to trace buffer
ring-buffer: do not grab locks in nmi
ring-buffer: add locks around rb_per_cpu_empty
ring-buffer: check for less than two in size allocation
ring-buffer: remove useless compile check for buffer_page size
ring-buffer: remove useless warn on check
ring-buffer: use BUF_PAGE_HDR_SIZE in calculating index
tracing: update sample event documentation
tracing/filters: fix race between filter setting and module unload
tracing/filters: free filter_string in destroy_preds()
ring-buffer: use commit counters for commit pointer accounting
ring-buffer: remove unused variable
ring-buffer: have benchmark test handle discarded events
ring-buffer: prevent adding write in discarded area
tracing/filters: strloc should be unsigned short
tracing/filters: operand can be negative
...
Fix up kmemcheck-induced conflict in kernel/trace/ring_buffer.c manually
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/ftrace.c | 6 |
4 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 73c0bda73fcd..d1430ef6b4f9 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -34,6 +34,7 @@ config X86 | |||
34 | select HAVE_DYNAMIC_FTRACE | 34 | select HAVE_DYNAMIC_FTRACE |
35 | select HAVE_FUNCTION_TRACER | 35 | select HAVE_FUNCTION_TRACER |
36 | select HAVE_FUNCTION_GRAPH_TRACER | 36 | select HAVE_FUNCTION_GRAPH_TRACER |
37 | select HAVE_FUNCTION_GRAPH_FP_TEST | ||
37 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST | 38 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST |
38 | select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE | 39 | select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE |
39 | select HAVE_FTRACE_SYSCALLS | 40 | select HAVE_FTRACE_SYSCALLS |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 9f8ce77dbc64..c097e7d607c6 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -1174,6 +1174,7 @@ ENTRY(ftrace_graph_caller) | |||
1174 | pushl %edx | 1174 | pushl %edx |
1175 | movl 0xc(%esp), %edx | 1175 | movl 0xc(%esp), %edx |
1176 | lea 0x4(%ebp), %eax | 1176 | lea 0x4(%ebp), %eax |
1177 | movl (%ebp), %ecx | ||
1177 | subl $MCOUNT_INSN_SIZE, %edx | 1178 | subl $MCOUNT_INSN_SIZE, %edx |
1178 | call prepare_ftrace_return | 1179 | call prepare_ftrace_return |
1179 | popl %edx | 1180 | popl %edx |
@@ -1188,6 +1189,7 @@ return_to_handler: | |||
1188 | pushl %eax | 1189 | pushl %eax |
1189 | pushl %ecx | 1190 | pushl %ecx |
1190 | pushl %edx | 1191 | pushl %edx |
1192 | movl %ebp, %eax | ||
1191 | call ftrace_return_to_handler | 1193 | call ftrace_return_to_handler |
1192 | movl %eax, 0xc(%esp) | 1194 | movl %eax, 0xc(%esp) |
1193 | popl %edx | 1195 | popl %edx |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index de74f0a3e0ed..c251be745107 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -135,6 +135,7 @@ ENTRY(ftrace_graph_caller) | |||
135 | 135 | ||
136 | leaq 8(%rbp), %rdi | 136 | leaq 8(%rbp), %rdi |
137 | movq 0x38(%rsp), %rsi | 137 | movq 0x38(%rsp), %rsi |
138 | movq (%rbp), %rdx | ||
138 | subq $MCOUNT_INSN_SIZE, %rsi | 139 | subq $MCOUNT_INSN_SIZE, %rsi |
139 | 140 | ||
140 | call prepare_ftrace_return | 141 | call prepare_ftrace_return |
@@ -150,6 +151,7 @@ GLOBAL(return_to_handler) | |||
150 | /* Save the return values */ | 151 | /* Save the return values */ |
151 | movq %rax, (%rsp) | 152 | movq %rax, (%rsp) |
152 | movq %rdx, 8(%rsp) | 153 | movq %rdx, 8(%rsp) |
154 | movq %rbp, %rdi | ||
153 | 155 | ||
154 | call ftrace_return_to_handler | 156 | call ftrace_return_to_handler |
155 | 157 | ||
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index b79c5533c421..d94e1ea3b9fe 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -408,7 +408,8 @@ int ftrace_disable_ftrace_graph_caller(void) | |||
408 | * Hook the return address and push it in the stack of return addrs | 408 | * Hook the return address and push it in the stack of return addrs |
409 | * in current thread info. | 409 | * in current thread info. |
410 | */ | 410 | */ |
411 | void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | 411 | void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr, |
412 | unsigned long frame_pointer) | ||
412 | { | 413 | { |
413 | unsigned long old; | 414 | unsigned long old; |
414 | int faulted; | 415 | int faulted; |
@@ -453,7 +454,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
453 | return; | 454 | return; |
454 | } | 455 | } |
455 | 456 | ||
456 | if (ftrace_push_return_trace(old, self_addr, &trace.depth) == -EBUSY) { | 457 | if (ftrace_push_return_trace(old, self_addr, &trace.depth, |
458 | frame_pointer) == -EBUSY) { | ||
457 | *parent = old; | 459 | *parent = old; |
458 | return; | 460 | return; |
459 | } | 461 | } |