Patches contributed by Eötvös Lorand University
commit 9de36825b321fe9fe9cf73260554251af579f4ca
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 17:52:03 2009 +0100
tracing: trace_bprintk() cleanups
Impact: cleanup
Remove a few leftovers and clean up the code a bit.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1236356510-8381-5-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/module.c b/kernel/module.c
index 2dece104f9a1..22d7379709da 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2158,12 +2158,6 @@ static noinline struct module *load_module(void __user *umod,
&mod->num_tracepoints);
#endif
-#ifdef CONFIG_TRACE_BPRINTK
- mod->trace_bprintk_fmt_start = section_objs(hdr, sechdrs, secstrings,
- "__trace_bprintk_fmt", sizeof(char *),
- &mod->num_trace_bprintk_fmt);
-#endif
-
#ifdef CONFIG_MODVERSIONS
if ((mod->num_syms && !mod->crcs)
|| (mod->num_gpl_syms && !mod->gpl_crcs)
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 6140922392c8..2bfb7d11fc17 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -119,14 +119,11 @@ struct userstack_entry {
*/
struct print_entry {
struct trace_entry ent;
- unsigned long ip;
+ unsigned long ip;
int depth;
const char *fmt;
- u32 buf[];
+ u32 buf[];
};
-#ifdef CONFIG_TRACE_BPRINTK
-extern int trace_bprintk_enable;
-#endif
#define TRACE_OLD_SIZE 88
@@ -199,7 +196,7 @@ struct kmemtrace_free_entry {
* trace_flag_type is an enumeration that holds different
* states when a trace occurs. These are:
* IRQS_OFF - interrupts were disabled
- * IRQS_NOSUPPORT - arch does not support irqs_disabled_flags
+ * IRQS_NOSUPPORT - arch does not support irqs_disabled_flags
* NEED_RESCED - reschedule is requested
* HARDIRQ - inside an interrupt handler
* SOFTIRQ - inside a softirq handler
@@ -302,7 +299,7 @@ extern void __ftrace_bad_type(void);
IF_ASSIGN(var, ent, struct ftrace_graph_ret_entry, \
TRACE_GRAPH_RET); \
IF_ASSIGN(var, ent, struct hw_branch_entry, TRACE_HW_BRANCHES);\
- IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
+ IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
IF_ASSIGN(var, ent, struct kmemtrace_alloc_entry, \
TRACE_KMEM_ALLOC); \
IF_ASSIGN(var, ent, struct kmemtrace_free_entry, \
@@ -325,8 +322,8 @@ enum print_line_t {
* flags value in struct tracer_flags.
*/
struct tracer_opt {
- const char *name; /* Will appear on the trace_options file */
- u32 bit; /* Mask assigned in val field in tracer_flags */
+ const char *name; /* Will appear on the trace_options file */
+ u32 bit; /* Mask assigned in val field in tracer_flags */
};
/*
@@ -335,7 +332,7 @@ struct tracer_opt {
*/
struct tracer_flags {
u32 val;
- struct tracer_opt *opts;
+ struct tracer_opt *opts;
};
/* Makes more easy to define a tracer opt */
@@ -390,7 +387,7 @@ struct tracer {
int (*set_flag)(u32 old_flags, u32 bit, int set);
struct tracer *next;
int print_max;
- struct tracer_flags *flags;
+ struct tracer_flags *flags;
struct tracer_stat *stats;
};
commit 546e5354a6e4ec760ac03ef1148e9a4762abb5f5
Merge: af438c0f114b fef20d9c1380
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 17:45:42 2009 +0100
Merge branch 'core/printk' into tracing/ftrace
commit f0ef03985130287c6c84ebe69416cf790e6cc00e
Merge: 16097439703b 31bbed527e70
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 16:44:14 2009 +0100
Merge branch 'x86/core' into tracing/textedit
Conflicts:
arch/x86/Kconfig
block/blktrace.c
kernel/irq/handle.c
Semantic conflict:
kernel/trace/blktrace.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --cc arch/x86/Kconfig
index bcc1d2a9d050,31758378bcd2..bdcee12c25ab
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@@ -34,9 -34,8 +34,9 @@@ config X8
select HAVE_FUNCTION_TRACER
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
+ select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
- select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
- select HAVE_ARCH_KGDB if !X86_VOYAGER
+ select HAVE_KVM
+ select HAVE_ARCH_KGDB
select HAVE_ARCH_TRACEHOOK
select HAVE_GENERIC_DMA_COHERENT if X86_32
select HAVE_EFFICIENT_UNALIGNED_ACCESS
diff --cc arch/x86/kernel/cpu/intel.c
index 5fff00c70de0,25c559ba8d54..1a89a2b68d15
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@@ -65,10 -60,20 +64,22 @@@ static void __cpuinit early_init_intel(
if (c->x86_power & (1 << 8)) {
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
+ set_cpu_cap(c, X86_FEATURE_TSC_RELIABLE);
+ sched_clock_stable = 1;
}
+ /*
+ * There is a known erratum on Pentium III and Core Solo
+ * and Core Duo CPUs.
+ * " Page with PAT set to WC while associated MTRR is UC
+ * may consolidate to UC "
+ * Because of this erratum, it is better to stick with
+ * setting WC in MTRR rather than using PAT on these CPUs.
+ *
+ * Enable PAT WC only on P4, Core 2 or later CPUs.
+ */
+ if (c->x86 == 6 && c->x86_model < 15)
+ clear_cpu_cap(c, X86_FEATURE_PAT);
}
#ifdef CONFIG_X86_32
diff --cc arch/x86/kernel/process.c
index 23b328edc2b3,6afa5232dbb7..8c037051b353
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@@ -8,9 -8,12 +8,12 @@@
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/clockchips.h>
-#include <linux/ftrace.h>
+#include <trace/power.h>
#include <asm/system.h>
#include <asm/apic.h>
+ #include <asm/idle.h>
+ #include <asm/uaccess.h>
+ #include <asm/i387.h>
unsigned long idle_halt;
EXPORT_SYMBOL(idle_halt);
diff --cc kernel/irq/handle.c
index 4709a7c870d7,f51eaee921b6..412370ab9a34
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@@ -17,7 -17,7 +17,8 @@@
#include <linux/kernel_stat.h>
#include <linux/rculist.h>
#include <linux/hash.h>
+#include <trace/irq.h>
+ #include <linux/bootmem.h>
#include "internals.h"
commit af438c0f114b6f731b923b5c07150f6159471502
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 12:47:08 2009 +0100
tracing, power-trace: make it build even if the power-tracer is turned off
Impact: build fix
The 'struct power_trace' definition is needed (for the event tracer) even if
the power-tracer plugin is turned off in the .config.
Cc: Steven Rostedt <srostedt@redhat.com>
LKML-Reference: <20090306104106.GF31042@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/include/trace/power.h b/include/trace/power.h
index 2c733e58e89c..38aca537e497 100644
--- a/include/trace/power.h
+++ b/include/trace/power.h
@@ -11,12 +11,10 @@ enum {
};
struct power_trace {
-#ifdef CONFIG_POWER_TRACER
ktime_t stamp;
ktime_t end;
int type;
int state;
-#endif
};
DECLARE_TRACE(power_start,
commit 7fc07d84108d54c5b94625c0e168f31b2d66976e
Merge: b67802ea8061 8a0be9ef8225
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 11:47:52 2009 +0100
Merge branch 'sched/core' into sched/cleanups
commit bc722f508a5bcbb65a7bb0c7ce8e3934f5763a1a
Merge: 16097439703b 770cb24345c0
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 11:40:37 2009 +0100
Merge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace
commit 16097439703bcd38e9fe5608c12add6dacb825ea
Merge: 40ada30f9621 0012693ad4f6
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 6 11:39:18 2009 +0100
Merge branches 'tracing/ftrace' and 'tracing/function-graph-tracer' into tracing/core
commit 40ada30f9621fbd831ac2437b9a2a399aad34b00
Author: Ingo Molnar <mingo@elte.hu>
Date: Thu Mar 5 21:19:55 2009 +0100
tracing: clean up menu
Clean up menu structure, introduce TRACING_SUPPORT switch that signals
whether an architecture supports various instrumentation mechanisms.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/Kconfig b/arch/Kconfig
index 550dab22daa1..a092dc77c24d 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -6,6 +6,7 @@ config OPROFILE
tristate "OProfile system profiling (EXPERIMENTAL)"
depends on PROFILING
depends on HAVE_OPROFILE
+ depends on TRACING_SUPPORT
select TRACING
select RING_BUFFER
help
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 999c6a2485df..5d733da5345a 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -53,12 +53,22 @@ config TRACING
select TRACEPOINTS
select NOP_TRACER
+#
+# Minimum requirements an architecture has to meet for us to
+# be able to offer generic tracing facilities:
+#
+config TRACING_SUPPORT
+ bool
+ depends on TRACE_IRQFLAGS_SUPPORT
+ depends on STACKTRACE_SUPPORT
+
+if TRACING_SUPPORT
+
menu "Tracers"
config FUNCTION_TRACER
bool "Kernel Function Tracer"
depends on HAVE_FUNCTION_TRACER
- depends on DEBUG_KERNEL
select FRAME_POINTER
select KALLSYMS
select TRACING
@@ -91,7 +101,6 @@ config IRQSOFF_TRACER
default n
depends on TRACE_IRQFLAGS_SUPPORT
depends on GENERIC_TIME
- depends on DEBUG_KERNEL
select TRACE_IRQFLAGS
select TRACING
select TRACER_MAX_TRACE
@@ -114,7 +123,6 @@ config PREEMPT_TRACER
default n
depends on GENERIC_TIME
depends on PREEMPT
- depends on DEBUG_KERNEL
select TRACING
select TRACER_MAX_TRACE
help
@@ -142,7 +150,6 @@ config SYSPROF_TRACER
config SCHED_TRACER
bool "Scheduling Latency Tracer"
- depends on DEBUG_KERNEL
select TRACING
select CONTEXT_SWITCH_TRACER
select TRACER_MAX_TRACE
@@ -152,7 +159,6 @@ config SCHED_TRACER
config CONTEXT_SWITCH_TRACER
bool "Trace process context switches"
- depends on DEBUG_KERNEL
select TRACING
select MARKERS
help
@@ -161,7 +167,6 @@ config CONTEXT_SWITCH_TRACER
config EVENT_TRACER
bool "Trace various events in the kernel"
- depends on DEBUG_KERNEL
select TRACING
help
This tracer hooks to various trace points in the kernel
@@ -170,7 +175,6 @@ config EVENT_TRACER
config BOOT_TRACER
bool "Trace boot initcalls"
- depends on DEBUG_KERNEL
select TRACING
select CONTEXT_SWITCH_TRACER
help
@@ -188,7 +192,6 @@ config BOOT_TRACER
config TRACE_BRANCH_PROFILING
bool "Trace likely/unlikely profiler"
- depends on DEBUG_KERNEL
select TRACING
help
This tracer profiles all the the likely and unlikely macros
@@ -241,7 +244,6 @@ config BRANCH_TRACER
config POWER_TRACER
bool "Trace power consumption behavior"
- depends on DEBUG_KERNEL
depends on X86
select TRACING
help
@@ -253,7 +255,6 @@ config POWER_TRACER
config STACK_TRACER
bool "Trace max stack"
depends on HAVE_FUNCTION_TRACER
- depends on DEBUG_KERNEL
select FUNCTION_TRACER
select STACKTRACE
select KALLSYMS
@@ -343,7 +344,6 @@ config DYNAMIC_FTRACE
bool "enable/disable ftrace tracepoints dynamically"
depends on FUNCTION_TRACER
depends on HAVE_DYNAMIC_FTRACE
- depends on DEBUG_KERNEL
default y
help
This option will modify all the calls to ftrace dynamically
@@ -369,7 +369,7 @@ config FTRACE_SELFTEST
config FTRACE_STARTUP_TEST
bool "Perform a startup test on ftrace"
- depends on TRACING && DEBUG_KERNEL
+ depends on TRACING
select FTRACE_SELFTEST
help
This option performs a series of startup tests on ftrace. On bootup
@@ -379,7 +379,7 @@ config FTRACE_STARTUP_TEST
config MMIOTRACE
bool "Memory mapped IO tracing"
- depends on HAVE_MMIOTRACE_SUPPORT && DEBUG_KERNEL && PCI
+ depends on HAVE_MMIOTRACE_SUPPORT && PCI
select TRACING
help
Mmiotrace traces Memory Mapped I/O access and is meant for
@@ -401,3 +401,6 @@ config MMIOTRACE_TEST
Say N, unless you absolutely know what you are doing.
endmenu
+
+endif # TRACING_SUPPORT
+
commit 31bbed527e7039203920c51c9fb48c27aed0820c
Merge: 0fbba4871c42 b2b352590d94
Author: Ingo Molnar <mingo@elte.hu>
Date: Thu Mar 5 21:49:47 2009 +0100
Merge branch 'x86/uv' into x86/core
commit 0fbba4871c42b297b0d6a6a6ff73e934cb91423e
Merge: 28e93a005b65 a1aade478862
Author: Ingo Molnar <mingo@elte.hu>
Date: Thu Mar 5 21:49:44 2009 +0100
Merge branch 'x86/doc' into x86/core