From: Ingo Molnar Date: Mon, 14 Jul 2008 14:11:52 +0000 (+0200) Subject: Merge branch 'auto-ftrace-next' into tracing/for-linus X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5806b81ac1c0c52665b91723fd4146a4f86e386b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge branch 'auto-ftrace-next' into tracing/for-linus Conflicts: arch/x86/kernel/entry_32.S arch/x86/kernel/process_32.c arch/x86/kernel/process_64.c arch/x86/lib/Makefile include/asm-x86/irqflags.h kernel/Makefile kernel/sched.c Signed-off-by: Ingo Molnar --- 5806b81ac1c0c52665b91723fd4146a4f86e386b diff --cc arch/x86/kernel/Makefile index 55ff016e9f69,5ff67208d4ae..5112c84f5421 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@@ -54,9 -60,10 +61,10 @@@ obj-$(CONFIG_X86_32_SMP) += smpcommon. obj-$(CONFIG_X86_64_SMP) += tsc_sync.o smpcommon.o obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o obj-$(CONFIG_X86_MPPARSE) += mpparse.o -obj-$(CONFIG_X86_LOCAL_APIC) += apic_$(BITS).o nmi_$(BITS).o +obj-$(CONFIG_X86_LOCAL_APIC) += apic_$(BITS).o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic_$(BITS).o obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o + obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o diff --cc arch/x86/kernel/entry_32.S index cfe28a715434,95e6bbe3665e..6bc07f0f1202 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@@ -51,7 -51,8 +51,8 @@@ #include #include #include + #include -#include "irq_vectors.h" +#include /* * We use macros for low-level operations which need to be overridden diff --cc arch/x86/kernel/process_32.c index 9a139f6c9df3,347a7aba8b16..0c3927accb00 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@@ -142,7 -185,10 +142,10 @@@ void cpu_idle(void local_irq_disable(); __get_cpu_var(irq_stat).idle_timestamp = jiffies; + /* Don't trace irqs off for idle */ + stop_critical_timings(); - idle(); + pm_idle(); + start_critical_timings(); } tick_nohz_restart_sched_tick(); preempt_enable_no_resched(); diff --cc arch/x86/kernel/process_64.c index db5eb963e4df,ea090e6cfe39..a8e53626ac9a --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@@ -134,7 -165,10 +134,10 @@@ void cpu_idle(void */ local_irq_disable(); enter_idle(); + /* Don't trace irqs off for idle */ + stop_critical_timings(); - idle(); + pm_idle(); + start_critical_timings(); /* In many cases the interrupt that ended idle has already called exit_idle. But some idle loops can be woken up without interrupt. */ diff --cc arch/x86/lib/Makefile index 83226e0a7ce4,84aa2883fe15..aa3fa4119424 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@@ -4,8 -4,9 +4,9 @@@ obj-$(CONFIG_SMP) := msr-on-cpu.o -lib-y := delay_$(BITS).o +lib-y := delay.o + lib-y += thunk_$(BITS).o -lib-y += usercopy_$(BITS).o getuser_$(BITS).o putuser_$(BITS).o +lib-y += usercopy_$(BITS).o getuser.o putuser.o lib-y += memcpy_$(BITS).o ifeq ($(CONFIG_X86_32),y) diff --cc include/asm-x86/irqflags.h index 17e7a1701c97,24d71b1eb189..424acb48cd61 --- a/include/asm-x86/irqflags.h +++ b/include/asm-x86/irqflags.h @@@ -190,8 -169,16 +190,6 @@@ static inline void trace_hardirqs_fixup #else #ifdef CONFIG_X86_64 - #define ARCH_TRACE_IRQS_ON call trace_hardirqs_on_thunk - #define ARCH_TRACE_IRQS_OFF call trace_hardirqs_off_thunk -/* - * Currently paravirt can't handle swapgs nicely when we - * don't have a stack we can rely on (such as a user space - * stack). So we either find a way around these or just fault - * and emulate if a guest tries to call swapgs directly. - * - * Either way, this is a good way to document that we don't - * have a reliable stack. x86_64 only. - */ -#define SWAPGS_UNSAFE_STACK swapgs #define ARCH_LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk #define ARCH_LOCKDEP_SYS_EXIT_IRQ \ TRACE_IRQS_ON; \ diff --cc include/linux/linkage.h index 9fd1f859021b,14f329c64ba8..56ba37394656 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@@ -1,9 -1,10 +1,11 @@@ #ifndef _LINUX_LINKAGE_H #define _LINUX_LINKAGE_H +#include #include + #define notrace __attribute__((no_instrument_function)) + #ifdef __cplusplus #define CPP_ASMLINKAGE extern "C" #else diff --cc kernel/Makefile index 6c55301112e0,480976275d98..f6328e16dfdd --- a/kernel/Makefile +++ b/kernel/Makefile @@@ -69,7 -81,8 +81,9 @@@ obj-$(CONFIG_TASK_DELAY_ACCT) += delaya obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o obj-$(CONFIG_MARKERS) += marker.o obj-$(CONFIG_LATENCYTOP) += latencytop.o + obj-$(CONFIG_FTRACE) += trace/ + obj-$(CONFIG_TRACING) += trace/ +obj-$(CONFIG_SMP) += sched_cpupri.o ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) # According to Alan Modra , the -fno-omit-frame-pointer is diff --cc kernel/sched.c index 591d5e7f757a,42899dce837d..c74b0d23c752 --- a/kernel/sched.c +++ b/kernel/sched.c @@@ -2448,8 -2299,11 +2470,11 @@@ void wake_up_new_task(struct task_struc * management (if any): */ p->sched_class->task_new(rq, p); - inc_nr_running(p, rq); + inc_nr_running(rq); } + trace_mark(kernel_sched_wakeup_new, + "pid %d state %ld ## rq %p task %p rq->curr %p", + p->pid, p->state, rq, p, rq->curr); check_preempt_curr(rq, p); #ifdef CONFIG_SMP if (p->sched_class->task_wake_up)