mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
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: tracing, x86: fix constraint for parent variable tracing, x86: fix fixup section to return to original code profiling: fix broken profiling regression
This commit is contained in:
commit
b3f2caaaa8
@ -488,20 +488,21 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
|
|||||||
* ignore such a protection.
|
* ignore such a protection.
|
||||||
*/
|
*/
|
||||||
asm volatile(
|
asm volatile(
|
||||||
"1: " _ASM_MOV " (%[parent_old]), %[old]\n"
|
"1: " _ASM_MOV " (%[parent]), %[old]\n"
|
||||||
"2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n"
|
"2: " _ASM_MOV " %[return_hooker], (%[parent])\n"
|
||||||
" movl $0, %[faulted]\n"
|
" movl $0, %[faulted]\n"
|
||||||
|
"3:\n"
|
||||||
|
|
||||||
".section .fixup, \"ax\"\n"
|
".section .fixup, \"ax\"\n"
|
||||||
"3: movl $1, %[faulted]\n"
|
"4: movl $1, %[faulted]\n"
|
||||||
|
" jmp 3b\n"
|
||||||
".previous\n"
|
".previous\n"
|
||||||
|
|
||||||
_ASM_EXTABLE(1b, 3b)
|
_ASM_EXTABLE(1b, 4b)
|
||||||
_ASM_EXTABLE(2b, 3b)
|
_ASM_EXTABLE(2b, 4b)
|
||||||
|
|
||||||
: [parent_replaced] "=r" (parent), [old] "=r" (old),
|
: [old] "=r" (old), [faulted] "=r" (faulted)
|
||||||
[faulted] "=r" (faulted)
|
: [parent] "r" (parent), [return_hooker] "r" (return_hooker)
|
||||||
: [parent_old] "0" (parent), [return_hooker] "r" (return_hooker)
|
|
||||||
: "memory"
|
: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -114,12 +114,15 @@ int __ref profile_init(void)
|
|||||||
if (!slab_is_available()) {
|
if (!slab_is_available()) {
|
||||||
prof_buffer = alloc_bootmem(buffer_bytes);
|
prof_buffer = alloc_bootmem(buffer_bytes);
|
||||||
alloc_bootmem_cpumask_var(&prof_cpu_mask);
|
alloc_bootmem_cpumask_var(&prof_cpu_mask);
|
||||||
|
cpumask_copy(prof_cpu_mask, cpu_possible_mask);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL))
|
if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
cpumask_copy(prof_cpu_mask, cpu_possible_mask);
|
||||||
|
|
||||||
prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL);
|
prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL);
|
||||||
if (prof_buffer)
|
if (prof_buffer)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user