* [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes
@ 2011-01-08 20:15 Steven Rostedt
2011-01-08 20:16 ` [PATCH 1/7] tracing: Include module.h in define_trace.h Steven Rostedt
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
Ingo,
Please pull the latest tip/perf/core tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/perf/core
Jason Baron (1):
dynamic debug: Fix build issue with older gcc
Lai Jiangshan (1):
tracepoint: Add __rcu annotation
Li Zefan (1):
tracing: Fix preempt count leak
Mathieu Desnoyers (3):
tracing/trivial: Add missing comma in TRACE_EVENT comment
tracing: remove duplicate null-pointer check in skb tracepoint
tracing: Fix TRACE_EVENT power tracepoint creation
Steven Rostedt (1):
tracing: Include module.h in define_trace.h
----
include/linux/dynamic_debug.h | 18 ++++--------------
include/linux/tracepoint.h | 4 ++--
include/trace/define_trace.h | 10 ++++++++++
include/trace/events/skb.h | 4 +---
kernel/Makefile | 1 +
kernel/trace/Makefile | 2 +-
kernel/trace/trace.c | 6 ++----
lib/dynamic_debug.c | 9 ++++-----
8 files changed, 25 insertions(+), 29 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/7] tracing: Include module.h in define_trace.h
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
2011-01-08 20:16 ` [PATCH 2/7] tracing/trivial: Add missing comma in TRACE_EVENT comment Steven Rostedt
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
[-- Attachment #1: 0001-tracing-Include-module.h-in-define_trace.h.patch --]
[-- Type: text/plain, Size: 1263 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
While doing some developing, Peter Zijlstra and I have found
that if a CREATE_TRACE_POINTS include is done before module.h
is included, it can break the build.
We have been lucky so far that this has not broke the build
since module.h is included in almost everything.
Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/trace/define_trace.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h
index b0b4eb2..da39b22 100644
--- a/include/trace/define_trace.h
+++ b/include/trace/define_trace.h
@@ -21,6 +21,16 @@
#undef CREATE_TRACE_POINTS
#include <linux/stringify.h>
+/*
+ * module.h includes tracepoints, and because ftrace.h
+ * pulls in module.h:
+ * trace/ftrace.h -> linux/ftrace_event.h -> linux/perf_event.h ->
+ * linux/ftrace.h -> linux/module.h
+ * we must include module.h here before we play with any of
+ * the TRACE_EVENT() macros, otherwise the tracepoints included
+ * by module.h may break the build.
+ */
+#include <linux/module.h>
#undef TRACE_EVENT
#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/7] tracing/trivial: Add missing comma in TRACE_EVENT comment
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
2011-01-08 20:16 ` [PATCH 1/7] tracing: Include module.h in define_trace.h Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
2011-01-08 20:16 ` [PATCH 3/7] tracing: remove duplicate null-pointer check in skb tracepoint Steven Rostedt
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker,
Mathieu Desnoyers, Thomas Gleixner
[-- Attachment #1: 0002-tracing-trivial-Add-missing-comma-in-TRACE_EVENT-com.patch --]
[-- Type: text/plain, Size: 937 bytes --]
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add missing comma within the TRACE_EVENT() example in tracepoint.h.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
LKML-Reference: <20110106184532.GA2526@Krystal>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/tracepoint.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index d3e4f87..899103c 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -326,7 +326,7 @@ do_trace: \
* memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
* __entry->next_pid = next->pid;
* __entry->next_prio = next->prio;
- * )
+ * ),
*
* *
* * Formatted output of a trace record via TP_printk().
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/7] tracing: remove duplicate null-pointer check in skb tracepoint
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
2011-01-08 20:16 ` [PATCH 1/7] tracing: Include module.h in define_trace.h Steven Rostedt
2011-01-08 20:16 ` [PATCH 2/7] tracing/trivial: Add missing comma in TRACE_EVENT comment Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
2011-01-08 20:16 ` [PATCH 4/7] tracepoint: Add __rcu annotation Steven Rostedt
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker,
Mathieu Desnoyers, Neil Horman, David S. Miller, Thomas Gleixner,
Zhaolei
[-- Attachment #1: 0003-tracing-remove-duplicate-null-pointer-check-in-skb-t.patch --]
[-- Type: text/plain, Size: 1185 bytes --]
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
The check for NULL skb in the kfree_skb trace event is a duplicate from the
check already done in its only caller, kfree_skb(). Remove this duplicate check.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
LKML-Reference: <20110106175319.GA30610@Krystal>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Zhaolei <zhaolei@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/trace/events/skb.h | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index 75ce9d5..f10293c 100644
--- a/include/trace/events/skb.h
+++ b/include/trace/events/skb.h
@@ -25,9 +25,7 @@ TRACE_EVENT(kfree_skb,
TP_fast_assign(
__entry->skbaddr = skb;
- if (skb) {
- __entry->protocol = ntohs(skb->protocol);
- }
+ __entry->protocol = ntohs(skb->protocol);
__entry->location = location;
),
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/7] tracepoint: Add __rcu annotation
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
` (2 preceding siblings ...)
2011-01-08 20:16 ` [PATCH 3/7] tracing: remove duplicate null-pointer check in skb tracepoint Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
2011-01-08 20:16 ` [PATCH 5/7] tracing: Fix preempt count leak Steven Rostedt
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker,
Mathieu Desnoyers, Lai Jiangshan
[-- Attachment #1: 0004-tracepoint-Add-__rcu-annotation.patch --]
[-- Type: text/plain, Size: 896 bytes --]
From: Lai Jiangshan <laijs@cn.fujitsu.com>
Add __rcu annotation to :
(struct tracepoint)->funcs
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4D22D4F1.50505@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/tracepoint.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 899103c..c681461 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -32,7 +32,7 @@ struct tracepoint {
int state; /* State. */
void (*regfunc)(void);
void (*unregfunc)(void);
- struct tracepoint_func *funcs;
+ struct tracepoint_func __rcu *funcs;
} __attribute__((aligned(32))); /*
* Aligned on 32 bytes because it is
* globally visible and gcc happily
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/7] tracing: Fix preempt count leak
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
` (3 preceding siblings ...)
2011-01-08 20:16 ` [PATCH 4/7] tracepoint: Add __rcu annotation Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
2011-01-08 20:16 ` [PATCH 6/7] tracing: Fix TRACE_EVENT power tracepoint creation Steven Rostedt
2011-01-08 20:16 ` [PATCH 7/7] dynamic debug: Fix build issue with older gcc Steven Rostedt
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, stable, Li Zefan
[-- Attachment #1: 0005-tracing-Fix-preempt-count-leak.patch --]
[-- Type: text/plain, Size: 1408 bytes --]
From: Li Zefan <lizf@cn.fujitsu.com>
While running my ftrace stress test, this showed up:
BUG: sleeping function called from invalid context at mm/mmap.c:233
...
note: cat[3293] exited with preempt_count 1
The bug was introduced by commit 91e86e560d0b3ce4c5fc64fd2bbb99f856a30a4e
("tracing: Fix recursive user stack trace")
Cc: <stable@kernel.org>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4D0089AC.1020802@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f8cf959..dc53ecb 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1313,12 +1313,10 @@ ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc)
__this_cpu_inc(user_stack_count);
-
-
event = trace_buffer_lock_reserve(buffer, TRACE_USER_STACK,
sizeof(*entry), flags, pc);
if (!event)
- return;
+ goto out_drop_count;
entry = ring_buffer_event_data(event);
entry->tgid = current->tgid;
@@ -1333,8 +1331,8 @@ ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc)
if (!filter_check_discard(call, entry, buffer, event))
ring_buffer_unlock_commit(buffer, event);
+ out_drop_count:
__this_cpu_dec(user_stack_count);
-
out:
preempt_enable();
}
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/7] tracing: Fix TRACE_EVENT power tracepoint creation
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
` (4 preceding siblings ...)
2011-01-08 20:16 ` [PATCH 5/7] tracing: Fix preempt count leak Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
2011-01-08 20:16 ` [PATCH 7/7] dynamic debug: Fix build issue with older gcc Steven Rostedt
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Arjan van de Ven,
Mathieu Desnoyers
[-- Attachment #1: 0006-tracing-Fix-TRACE_EVENT-power-tracepoint-creation.patch --]
[-- Type: text/plain, Size: 1443 bytes --]
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
DEFINE_TRACE should also exist when CONFIG_EVENT_TRACING=n. Otherwise, setting
only TRACEPOINTS=y is broken.
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
LKML-Reference: <20101028153117.GA4051@Krystal>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/Makefile | 1 +
kernel/trace/Makefile | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/Makefile b/kernel/Makefile
index 0b5ff08..e0f2831 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -100,6 +100,7 @@ obj-$(CONFIG_FUNCTION_TRACER) += trace/
obj-$(CONFIG_TRACING) += trace/
obj-$(CONFIG_X86_DS) += trace/
obj-$(CONFIG_RING_BUFFER) += trace/
+obj-$(CONFIG_TRACEPOINTS) += trace/
obj-$(CONFIG_SMP) += sched_cpupri.o
obj-$(CONFIG_IRQ_WORK) += irq_work.o
obj-$(CONFIG_PERF_EVENTS) += perf_event.o
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index 53f3381..761c510 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -52,7 +52,7 @@ obj-$(CONFIG_EVENT_TRACING) += trace_event_perf.o
endif
obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o
obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o
-obj-$(CONFIG_EVENT_TRACING) += power-traces.o
+obj-$(CONFIG_TRACEPOINTS) += power-traces.o
ifeq ($(CONFIG_TRACING),y)
obj-$(CONFIG_KGDB_KDB) += trace_kdb.o
endif
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/7] dynamic debug: Fix build issue with older gcc
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
` (5 preceding siblings ...)
2011-01-08 20:16 ` [PATCH 6/7] tracing: Fix TRACE_EVENT power tracepoint creation Steven Rostedt
@ 2011-01-08 20:16 ` Steven Rostedt
6 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2011-01-08 20:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, stable,
Tetsuo Handa, Jason Baron
[-- Attachment #1: 0007-dynamic-debug-Fix-build-issue-with-older-gcc.patch --]
[-- Type: text/plain, Size: 3181 bytes --]
From: Jason Baron <jbaron@redhat.com>
On older gcc (3.3) dynamic debug fails to compile:
include/net/inet_connection_sock.h: In function `inet_csk_reset_xmit_timer':
include/net/inet_connection_sock.h:236: error: duplicate label declaration `do_printk'
include/net/inet_connection_sock.h:219: error: this is a previous declaration
include/net/inet_connection_sock.h:236: error: duplicate label declaration `out'
include/net/inet_connection_sock.h:219: error: this is a previous declaration
include/net/inet_connection_sock.h:236: error: duplicate label `do_printk'
include/net/inet_connection_sock.h:236: error: duplicate label `out'
Fix, by reverting the usage of JUMP_LABEL() in dynamic debug for now.
Cc: <stable@kernel.org>
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/dynamic_debug.h | 18 ++++--------------
lib/dynamic_debug.c | 9 ++++-----
2 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index a90b389..1c70028 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -44,34 +44,24 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
extern int ddebug_remove_module(const char *mod_name);
#define dynamic_pr_debug(fmt, ...) do { \
- __label__ do_printk; \
- __label__ out; \
static struct _ddebug descriptor \
__used \
__attribute__((section("__verbose"), aligned(8))) = \
{ KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
_DPRINTK_FLAGS_DEFAULT }; \
- JUMP_LABEL(&descriptor.enabled, do_printk); \
- goto out; \
-do_printk: \
- printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \
-out: ; \
+ if (unlikely(descriptor.enabled)) \
+ printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \
} while (0)
#define dynamic_dev_dbg(dev, fmt, ...) do { \
- __label__ do_printk; \
- __label__ out; \
static struct _ddebug descriptor \
__used \
__attribute__((section("__verbose"), aligned(8))) = \
{ KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \
_DPRINTK_FLAGS_DEFAULT }; \
- JUMP_LABEL(&descriptor.enabled, do_printk); \
- goto out; \
-do_printk: \
- dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
-out: ; \
+ if (unlikely(descriptor.enabled)) \
+ dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
} while (0)
#else
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 3094318..b335acb 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -141,11 +141,10 @@ static void ddebug_change(const struct ddebug_query *query,
else if (!dp->flags)
dt->num_enabled++;
dp->flags = newflags;
- if (newflags) {
- jump_label_enable(&dp->enabled);
- } else {
- jump_label_disable(&dp->enabled);
- }
+ if (newflags)
+ dp->enabled = 1;
+ else
+ dp->enabled = 0;
if (verbose)
printk(KERN_INFO
"ddebug: changed %s:%d [%s]%s %s\n",
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-01-08 20:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-08 20:15 [PATCH 0/7] [GIT PULL][2.6.38] tracing: updates and fixes Steven Rostedt
2011-01-08 20:16 ` [PATCH 1/7] tracing: Include module.h in define_trace.h Steven Rostedt
2011-01-08 20:16 ` [PATCH 2/7] tracing/trivial: Add missing comma in TRACE_EVENT comment Steven Rostedt
2011-01-08 20:16 ` [PATCH 3/7] tracing: remove duplicate null-pointer check in skb tracepoint Steven Rostedt
2011-01-08 20:16 ` [PATCH 4/7] tracepoint: Add __rcu annotation Steven Rostedt
2011-01-08 20:16 ` [PATCH 5/7] tracing: Fix preempt count leak Steven Rostedt
2011-01-08 20:16 ` [PATCH 6/7] tracing: Fix TRACE_EVENT power tracepoint creation Steven Rostedt
2011-01-08 20:16 ` [PATCH 7/7] dynamic debug: Fix build issue with older gcc Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox