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-Tag: v2.6.27-rc1~1102^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5806b81ac1c0c52665b91723fd4146a4f86e386b;p=linux-2.6 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 55ff016e9f,5ff67208d4..5112c84f54 --- 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 cfe28a7154,95e6bbe366..6bc07f0f12 --- 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 9a139f6c9d,347a7aba8b..0c3927accb --- 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 db5eb963e4,ea090e6cfe..a8e53626ac --- 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 83226e0a7c,84aa2883fe..aa3fa41194 --- 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 17e7a1701c,24d71b1eb1..424acb48cd --- 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 9fd1f85902,14f329c64b..56ba373946 --- 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 6c55301112,480976275d..f6328e16df --- 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 591d5e7f75,42899dce83..c74b0d23c7 --- 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)