Merge branch 'auto-ftrace-next' into tracing/for-linus
Ingo Molnar [Mon, 14 Jul 2008 14:11:52 +0000 (16:11 +0200)]
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 <mingo@elte.hu>

26 files changed:
1  2 
Makefile
arch/x86/Kconfig
arch/x86/Kconfig.debug
arch/x86/kernel/Makefile
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S
arch/x86/kernel/machine_kexec_32.c
arch/x86/kernel/machine_kexec_64.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/vsyscall_64.c
arch/x86/kernel/x8664_ksyms_64.c
arch/x86/lib/Makefile
arch/x86/mm/Makefile
arch/x86/mm/fault.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
arch/x86/mm/ioremap.c
arch/x86/mm/pageattr.c
include/asm-x86/irqflags.h
include/linux/linkage.h
include/linux/sched.h
kernel/Makefile
kernel/printk.c
kernel/sched.c
kernel/sysctl.c

diff --cc Makefile
Simple merge
Simple merge
Simple merge
@@@ -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
@@@ -51,7 -51,8 +51,8 @@@
  #include <asm/percpu.h>
  #include <asm/dwarf2.h>
  #include <asm/processor-flags.h>
+ #include <asm/ftrace.h>
 -#include "irq_vectors.h"
 +#include <asm/irq_vectors.h>
  
  /*
   * We use macros for low-level operations which need to be overridden
Simple merge
Simple merge
Simple merge
@@@ -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();
@@@ -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. */
Simple merge
Simple merge
@@@ -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)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -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; \
@@@ -1,9 -1,10 +1,11 @@@
  #ifndef _LINUX_LINKAGE_H
  #define _LINUX_LINKAGE_H
  
 +#include <linux/compiler.h>
  #include <asm/linkage.h>
  
+ #define notrace __attribute__((no_instrument_function))
  #ifdef __cplusplus
  #define CPP_ASMLINKAGE extern "C"
  #else
Simple merge
diff --cc 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 <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
diff --cc kernel/printk.c
Simple merge
diff --cc 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)
diff --cc kernel/sysctl.c
Simple merge