linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/18] Allow different tracers to be compiled independently
@ 2010-03-23  0:32 Jan Kara
  2010-03-23  0:32 ` [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints Jan Kara
                   ` (18 more replies)
  0 siblings, 19 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML


  Hi,

  currently, when one tracer is selected, most of tracepoints for other
tracers also gets pulled into the kernel. So for example it's not possible
to enable BLK_DEV_IO_TRACE without polluting slab allocation paths with
tracepoint checks (see changelog of patch 01). This patch set adds a
possibility for each set of trace points to be compile-enabled separately.
  The first patch contains the necessary magic in linux/tracepoint.h. Other
patches just tell tracing framework about correspoding config options
and possibly introduce them if they did not exist before.
  The patches in this patch set are actually completely independent so 
they can be merged via respective subsystem trees. But changes are rather
tiny so I don't expect much conflicts...

								Honza

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  1:06   ` Steven Rostedt
  2010-03-23  0:32 ` [PATCH 02/18] block: Generate blktrace trace points only if blktrace is enabled Jan Kara
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, Steven Rostedt, Frederic Weisbecker, Ingo Molnar

If a particular tracer is disabled, there is no need to generate any tracepoint
code for it. Actually, the inline checks whether tracepoints of the tracer are
active have non-negligible impact on a code size [1] and thus can in theory
lead to slowdown. This is undesirable when e.g. BLK_DEV_IO_TRACE should be
enabled in the production kernel but KMEMTRACE is disabled.

So introduce a macro trickery in <linux/tracepoint.h> so that each tracer can
define TRACE_CONFIG to CONFIG_MY_TRACER before including linux/tracepoint.h in
it's events file and that will result in tracepoints becoming empty if
CONFIG_MY_TRACER is not defined.

[1] As an example: bloat-o-meter mm/slub.o.untraced mm/slub.o.traced
add/remove: 61/1 grow/shrink: 24/10 up/down: 6366/-737 (5629)
function                                     old     new   delta
deactivate_slab                                -     592    +592
show_stat                                      -     380    +380
trace_kmalloc_node                             -     265    +265
trace_kmalloc                                  -     255    +255
kmem_cache_alloc_node                        590     825    +235
kmem_cache_alloc                             542     768    +226
kfree                                        566     763    +197
kmem_cache_free                              478     671    +193
...

CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/linux/tracepoint.h |   96 +++++++++++++++++++++++++++++++++++--------
 1 files changed, 78 insertions(+), 18 deletions(-)

diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index f59604e..1ad17cc 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -37,8 +37,7 @@ struct tracepoint {
 
 #define TP_PROTO(args...)	args
 #define TP_ARGS(args...)	args
-
-#ifdef CONFIG_TRACEPOINTS
+#define PARAMS(args...)		args
 
 /*
  * it_func[0] is never NULL because there is at least one element in the array
@@ -63,7 +62,7 @@ struct tracepoint {
  * not add unwanted padding between the beginning of the section and the
  * structure. Force alignment to the same alignment as the section start.
  */
-#define DECLARE_TRACE(name, proto, args)				\
+#define DECLARE_TRACE_1(name, proto, args)				\
 	extern struct tracepoint __tracepoint_##name;			\
 	static inline void trace_##name(proto)				\
 	{								\
@@ -81,26 +80,22 @@ struct tracepoint {
 	}
 
 
-#define DEFINE_TRACE_FN(name, reg, unreg)				\
+#define DEFINE_TRACE_FN_1(name, reg, unreg)				\
 	static const char __tpstrtab_##name[]				\
 	__attribute__((section("__tracepoints_strings"))) = #name;	\
 	struct tracepoint __tracepoint_##name				\
 	__attribute__((section("__tracepoints"), aligned(32))) =	\
 		{ __tpstrtab_##name, 0, reg, unreg, NULL }
 
-#define DEFINE_TRACE(name)						\
+#define DEFINE_TRACE_1(name)						\
 	DEFINE_TRACE_FN(name, NULL, NULL);
 
-#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)				\
+#define EXPORT_TRACEPOINT_SYMBOL_GPL_1(name)				\
 	EXPORT_SYMBOL_GPL(__tracepoint_##name)
-#define EXPORT_TRACEPOINT_SYMBOL(name)					\
+#define EXPORT_TRACEPOINT_SYMBOL_1(name)				\
 	EXPORT_SYMBOL(__tracepoint_##name)
 
-extern void tracepoint_update_probe_range(struct tracepoint *begin,
-	struct tracepoint *end);
-
-#else /* !CONFIG_TRACEPOINTS */
-#define DECLARE_TRACE(name, proto, args)				\
+#define DECLARE_TRACE_0(name, proto, args)				\
 	static inline void _do_trace_##name(struct tracepoint *tp, proto) \
 	{ }								\
 	static inline void trace_##name(proto)				\
@@ -114,10 +109,51 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin,
 		return -ENOSYS;						\
 	}
 
-#define DEFINE_TRACE_FN(name, reg, unreg)
-#define DEFINE_TRACE(name)
-#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
-#define EXPORT_TRACEPOINT_SYMBOL(name)
+#define DEFINE_TRACE_FN_0(name, reg, unreg)
+#define DEFINE_TRACE_0(name)
+#define EXPORT_TRACEPOINT_SYMBOL_GPL_0(name)
+#define EXPORT_TRACEPOINT_SYMBOL_0(name)
+
+/*
+ * Below two-level macro magic is really needed to propely expand TRACE_CONFIG
+ * macro to 0 or 1 in the end
+ */
+#define __DECLARE_TRACE(config, name, proto, args) \
+		DECLARE_TRACE_##config(name, PARAMS(proto), PARAMS(args))
+#define __DEFINE_TRACE_FN(config, name, reg, unreg) \
+			DEFINE_TRACE_FN_##config(name, reg, unreg)
+#define __DEFINE_TRACE(config, name) DEFINE_TRACE_##config(name)
+#define __EXPORT_TRACEPOINT_SYMBOL_GPL(config, name) \
+			EXPORT_TRACEPOINT_SYMBOL_GPL_##config(name)
+#define __EXPORT_TRACEPOINT_SYMBOL(config, name) \
+			EXPORT_TRACEPOINT_SYMBOL_##config(name)
+
+#define _DECLARE_TRACE(config, name, proto, args) \
+		__DECLARE_TRACE(config, name, PARAMS(proto), PARAMS(args))
+#define _DEFINE_TRACE_FN(config, name, reg, unreg) \
+			__DEFINE_TRACE_FN(config, name, reg, unreg)
+#define _DEFINE_TRACE(config, name) __DEFINE_TRACE(config, name)
+#define _EXPORT_TRACEPOINT_SYMBOL_GPL(config, name) \
+			__EXPORT_TRACEPOINT_SYMBOL_GPL(config, name)
+#define _EXPORT_TRACEPOINT_SYMBOL(config, name) \
+			__EXPORT_TRACEPOINT_SYMBOL(config, name)
+
+#define DECLARE_TRACE(name, proto, args) \
+		_DECLARE_TRACE(TRACE_CONFIG, name, PARAMS(proto), PARAMS(args))
+#define DEFINE_TRACE_FN(name, reg, unreg) \
+			_DEFINE_TRACE_FN(TRACE_CONFIG, name, reg, unreg)
+#define DEFINE_TRACE(name) _DEFINE_TRACE(TRACE_CONFIG, name)
+#define EXPORT_TRACEPOINT_SYMBOL_GPL(name) \
+			_EXPORT_TRACEPOINT_SYMBOL_GPL(TRACE_CONFIG, name)
+#define EXPORT_TRACEPOINT_SYMBOL(name) \
+			_EXPORT_TRACEPOINT_SYMBOL(TRACE_CONFIG, name)
+
+#ifdef CONFIG_TRACEPOINTS
+
+extern void tracepoint_update_probe_range(struct tracepoint *begin,
+	struct tracepoint *end);
+
+#else /* ! CONFIG_TRACEPOINTS */
 
 static inline void tracepoint_update_probe_range(struct tracepoint *begin,
 	struct tracepoint *end)
@@ -163,11 +199,35 @@ static inline void tracepoint_synchronize_unregister(void)
 	synchronize_sched();
 }
 
-#define PARAMS(args...) args
-
 #endif /* _LINUX_TRACEPOINT_H */
 
 /*
+ * The two chunks below are out of include file ifdef protection because
+ * we want to be able to define TRACE_CONFIG even before second or even
+ * later include of linux/tracepoint.h.
+ */
+/*
+ * Make tracepoints which are not converted to a new method of enabling
+ * always compiled in
+ */
+#ifndef TRACE_CONFIG
+#define TRACE_CONFIG 1
+#endif
+
+/*
+ * If TRACE_CONFIG is defined but a config option it is defined to isn't, make
+ * the result 0. It would require much less magic if the kernel was not
+ * compiled with -Wundef.
+ */
+#define CONFIG_TEST_1
+#define _CONFIG_UNDEF(x) !defined(CONFIG_TEST_##x)
+#define CONFIG_UNDEF(x) _CONFIG_UNDEF(x)
+#if CONFIG_UNDEF(TRACE_CONFIG)
+#undef TRACE_CONFIG
+#define TRACE_CONFIG 0
+#endif
+
+/*
  * Note: we keep the TRACE_EVENT outside the include file ifdef protection.
  *  This is due to the way trace events work. If a file includes two
  *  trace event headers under one "CREATE_TRACE_POINTS" the first include
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 02/18] block: Generate blktrace trace points only if blktrace is enabled
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
  2010-03-23  0:32 ` [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 03/18] mm: Generate kmemtrace trace points only if they are enabled Jan Kara
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, Jens Axboe

CC: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/block.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 5fb7273..6412165 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM block
+#define TRACE_CONFIG CONFIG_BLK_DEV_IO_TRACE
 
 #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_BLOCK_H
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 03/18] mm: Generate kmemtrace trace points only if they are enabled
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
  2010-03-23  0:32 ` [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints Jan Kara
  2010-03-23  0:32 ` [PATCH 02/18] block: Generate blktrace trace points only if blktrace is enabled Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled Jan Kara
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, linux-mm

CC: linux-mm@kvack.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/kmem.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index 3adca0c..1f93693 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM kmem
+#define TRACE_CONFIG CONFIG_KMEMTRACE
 
 #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KMEM_H
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (2 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 03/18] mm: Generate kmemtrace trace points only if they are enabled Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  1:11   ` Johannes Berg
  2010-03-23  0:32 ` [PATCH 05/18] workqueue: Generate trace points only when workqueue " Jan Kara
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, linux-wireless

CC: linux-wireless@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 net/mac80211/driver-trace.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 41baf73..0e6c059 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -1,11 +1,13 @@
 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
 #define __MAC80211_DRIVER_TRACE
 
+#undef TRACE_CONFIG
+#define TRACE_CONFIG CONFIG_MAC80211_DRIVER_API_TRACER
 #include <linux/tracepoint.h>
 #include <net/mac80211.h>
 #include "ieee80211_i.h"
 
-#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
+#if defined(__CHECKER__)
 #undef TRACE_EVENT
 #define TRACE_EVENT(name, proto, ...) \
 static inline void trace_ ## name(proto) {}
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 05/18] workqueue: Generate trace points only when workqueue tracer enabled
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (3 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled Jan Kara
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara

Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/workqueue.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h
index d6c9744..d1641ad 100644
--- a/include/trace/events/workqueue.h
+++ b/include/trace/events/workqueue.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM workqueue
+#define TRACE_CONFIG CONFIG_WORKQUEUE_TRACER
 
 #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_WORKQUEUE_H
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (4 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 05/18] workqueue: Generate trace points only when workqueue " Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  1:07   ` Frederic Weisbecker
  2010-03-23  0:32 ` [PATCH 07/18] ext4: Provide config options for enabling ext4 and jbd2 tracing Jan Kara
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, Ingo Molnar, Peter Zijlstra

CC: Ingo Molnar <mingo@elte.hu>
CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/sched.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index cfceb0b..0a08ab1 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM sched
+#define TRACE_CONFIG CONFIG_CONTEXT_SWITCH_TRACER
 
 #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_SCHED_H
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 07/18] ext4: Provide config options for enabling ext4 and jbd2 tracing
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (5 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 08/18] lockdep: Provide config option for enabling lock tracepoints Jan Kara
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, linux-ext4

CC: linux-ext4@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/ext4.h |    2 ++
 include/trace/events/jbd2.h |    2 ++
 kernel/trace/Kconfig        |   23 +++++++++++++++++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 2aa6aa3..f1ad2e3 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM ext4
+#define TRACE_CONFIG CONFIG_EXT4_TRACER
 
 #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_EXT4_H
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index bf16545..37e442b 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM jbd2
+#define TRACE_CONFIG CONFIG_JBD2_TRACER
 
 #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_JBD2_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 13e13d4..e696314 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -438,6 +438,29 @@ config BLK_DEV_IO_TRACE
 
 	  If unsure, say N.
 
+config EXT4_TRACER
+	bool "Support for tracing EXT4 events"
+	depends on EXT4_FS
+	select GENERIC_TRACER
+	select TRACE_ANY_MODULE if EXT4_FS=m
+	help
+	  Provide tracing for various functions in ext4 filesystem
+	  such as block allocation, delayed allocation, or writeback
+	  handling. This trace points can help with debugging allocation
+	  algorithms or writeback performance.
+
+	  If unsure, say N.
+
+config JBD2_TRACER
+	bool "JBD2 tracing"
+	depends on JBD2
+	select GENERIC_TRACER
+	help
+	  Provide tracing for several functions in JBD2 commit and
+	  checkpointing code.
+
+	  If unsure, say N.
+
 config KPROBE_EVENT
 	depends on KPROBES
 	depends on HAVE_REGS_AND_STACK_ACCESS_API
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 08/18] lockdep: Provide config option for enabling lock tracepoints
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (6 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 07/18] ext4: Provide config options for enabling ext4 and jbd2 tracing Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 09/18] module: Provide config option to enable tracing of module load / unload Jan Kara
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, Peter Zijlstra, Ingo Molnar

CC: Peter Zijlstra <peterz@infradead.org>
CC: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/lock.h |    2 ++
 kernel/trace/Kconfig        |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/lock.h b/include/trace/events/lock.h
index 5c1dcfc..a1836e5 100644
--- a/include/trace/events/lock.h
+++ b/include/trace/events/lock.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM lock
+#define TRACE_CONFIG CONFIG_LOCK_TRACER
 
 #if !defined(_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_LOCK_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index e696314..ac63423 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -402,6 +402,15 @@ config KMEMTRACE
 
 	  If unsure, say N.
 
+config LOCK_TRACER
+	bool "Trace lock operations"
+	depends on LOCKDEP
+	select GENERIC_TRACER
+	help
+	  Provide trace points for acquisition and release of locks.
+
+	  If unsure, say N
+
 config WORKQUEUE_TRACER
 	bool "Trace workqueues"
 	select GENERIC_TRACER
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 09/18] module: Provide config option to enable tracing of module load / unload
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (7 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 08/18] lockdep: Provide config option for enabling lock tracepoints Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 10/18] gfs2: Provide config option for enabling trace points Jan Kara
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara

Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/module.h |    2 ++
 kernel/trace/Kconfig          |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/module.h b/include/trace/events/module.h
index 4b0f48b..edaa505 100644
--- a/include/trace/events/module.h
+++ b/include/trace/events/module.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM module
+#define TRACE_CONFIG CONFIG_MODULE_TRACER
 
 #if !defined(_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_MODULE_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index ac63423..a9d7e33 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -411,6 +411,16 @@ config LOCK_TRACER
 
 	  If unsure, say N
 
+config MODULE_TRACER
+	bool "Trace module loading and unloading"
+	depends on MODULES
+	select GENERIC_TRACER
+	help
+	  Provide trace point for module loading, unloading, freeing,
+	  etc.
+
+	  If unsure, say N
+
 config WORKQUEUE_TRACER
 	bool "Trace workqueues"
 	select GENERIC_TRACER
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 10/18] gfs2: Provide config option for enabling trace points
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (8 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 09/18] module: Provide config option to enable tracing of module load / unload Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23 12:01   ` [Cluster-devel] " Steven Whitehouse
  2010-03-23  0:32 ` [PATCH 11/18] i915: Provide config option for enabling tracepoints Jan Kara
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, cluster-devel

CC: cluster-devel@redhat.com
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/gfs2/Kconfig      |    8 ++++++++
 fs/gfs2/trace_gfs2.h |    2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
index 4dcddf8..872ced2 100644
--- a/fs/gfs2/Kconfig
+++ b/fs/gfs2/Kconfig
@@ -38,3 +38,11 @@ config GFS2_FS_LOCKING_DLM
 	  Most users of GFS2 will require this. It provides the locking
 	  interface between GFS2 and the DLM, which is required to use GFS2
 	  in a cluster environment.
+
+config GFS2_TRACER
+	bool "GFS2 tracing"
+	depends on GFS2_FS && EVENT_TRACING
+	help
+	  Provide trace points in block allocation functions, locking, and
+	  journaling code.
+
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index 148d55c..5f4faf3 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM gfs2
+#define TRACE_CONFIG CONFIG_GFS2_TRACER
 
 #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_GFS2_H
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 11/18] i915: Provide config option for enabling tracepoints
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (9 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 10/18] gfs2: Provide config option for enabling trace points Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  8:42   ` Chris Wilson
  2010-03-23  0:32 ` [PATCH 12/18] timer: Provide config option for enabling timer tracepoints Jan Kara
                   ` (7 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, dri-devel

CC: dri-devel@lists.sourceforge.net
Signed-off-by: Jan Kara <jack@suse.cz>
---
 drivers/gpu/drm/Kconfig           |    9 +++++++++
 drivers/gpu/drm/i915/i915_trace.h |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 305c590..bce8013 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -124,6 +124,15 @@ config DRM_I915_KMS
 	  the driver to bind to PCI devices, which precludes loading things
 	  like intelfb.
 
+config DRM_I915_TRACER
+	bool "Enable tracing of i915 driver"
+	depends on DRM_I915 && EVENT_TRACING
+	help
+	  Say Y here to make i915 driver provide trace points in functions
+	  handling irqs, dmas, and gem.
+
+	  If unsure, say N.
+
 endchoice
 
 config DRM_MGA
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 01840d9..fdb59c2 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -3,6 +3,8 @@
 
 #include <linux/stringify.h>
 #include <linux/types.h>
+#undef TRACE_CONFIG
+#define TRACE_CONFIG CONFIG_DRM_I915_TRACER
 #include <linux/tracepoint.h>
 
 #include <drm/drmP.h>
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 12/18] timer: Provide config option for enabling timer tracepoints
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (10 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 11/18] i915: Provide config option for enabling tracepoints Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  2:01   ` Thomas Gleixner
  2010-03-23  0:32 ` [PATCH 13/18] acpi: Provide config option to enable power tracepoints Jan Kara
                   ` (6 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, Thomas Gleixner

CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/timer.h |    2 ++
 kernel/trace/Kconfig         |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 9496b96..2737598 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM timer
+#define TRACE_CONFIG CONFIG_TIMER_TRACER
 
 #if !defined(_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_TIMER_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index a9d7e33..787f52e 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -421,6 +421,15 @@ config MODULE_TRACER
 
 	  If unsure, say N
 
+config TIMER_TRACER
+	bool "Trace timer actions"
+	select GENERIC_TRACER
+	help
+	  Provide trace points for timer initialization, starting, expiring,
+	  and canceling.
+
+	  If unsure, say N
+
 config WORKQUEUE_TRACER
 	bool "Trace workqueues"
 	select GENERIC_TRACER
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 13/18] acpi: Provide config option to enable power tracepoints
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (11 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 12/18] timer: Provide config option for enabling timer tracepoints Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 14/18] net: Provide config option for enabling SKB tracing Jan Kara
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, linux-acpi

CC: linux-acpi@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/power.h |    2 ++
 kernel/trace/Kconfig         |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index c4efe9b..6d84fc1 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM power
+#define TRACE_CONFIG CONFIG_POWER_TRACER
 
 #if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_POWER_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 787f52e..a48ff49 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -430,6 +430,15 @@ config TIMER_TRACER
 
 	  If unsure, say N
 
+config POWER_TRACER
+	bool "Trace power events"
+	select GENERIC_TRACER
+	help
+	  Provide trace points for events like changing CPU frequency,
+	  turning CPUs on / off.
+
+	  If unsure, say N
+
 config WORKQUEUE_TRACER
 	bool "Trace workqueues"
 	select GENERIC_TRACER
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 14/18] net: Provide config option for enabling SKB tracing
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (12 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 13/18] acpi: Provide config option to enable power tracepoints Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 15/18] net: Provide config option for enabling NAPI tracing Jan Kara
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, David S. Miller, netdev

CC: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/skb.h |    2 ++
 kernel/trace/Kconfig       |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index 4b2be6d..cd340df 100644
--- a/include/trace/events/skb.h
+++ b/include/trace/events/skb.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM skb
+#define TRACE_CONFIG CONFIG_SKB_TRACER
 
 #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_SKB_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index a48ff49..a02d577 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -498,6 +498,16 @@ config JBD2_TRACER
 
 	  If unsure, say N.
 
+config SKB_TRACER
+	bool "SKB tracing"
+	depends on NET
+	select GENERIC_TRACER
+	help
+	  Provide tracing for copying datagrams into iovecs and freeing
+	  skbs.
+
+	  If unsure, say N.
+
 config KPROBE_EVENT
 	depends on KPROBES
 	depends on HAVE_REGS_AND_STACK_ACCESS_API
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 15/18] net: Provide config option for enabling NAPI tracing
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (13 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 14/18] net: Provide config option for enabling SKB tracing Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 16/18] Generate empty tracepoints if syscall tracing is disabled Jan Kara
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, David S. Miller, netdev

CC: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/napi.h |    2 ++
 kernel/trace/Kconfig        |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h
index a8989c4..70cb4dd 100644
--- a/include/trace/events/napi.h
+++ b/include/trace/events/napi.h
@@ -2,6 +2,8 @@
 #define _TRACE_NAPI_H_
 
 #include <linux/netdevice.h>
+#undef TRACE_CONFIG
+#define TRACE_CONFIG CONFIG_NAPI_TRACER
 #include <linux/tracepoint.h>
 
 DECLARE_TRACE(napi_poll,
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index a02d577..88b556c 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -508,6 +508,15 @@ config SKB_TRACER
 
 	  If unsure, say N.
 
+config NAPI_TRACER
+	bool "NAPI tracing"
+	depends on NET
+	select GENERIC_TRACER
+	help
+	  Provide tracing for NAPI functions.
+
+	  If unsure, say N.
+
 config KPROBE_EVENT
 	depends on KPROBES
 	depends on HAVE_REGS_AND_STACK_ACCESS_API
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 16/18] Generate empty tracepoints if syscall tracing is disabled
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (14 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 15/18] net: Provide config option for enabling NAPI tracing Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 17/18] kvm: Provide config option for enabling KVM trace events Jan Kara
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, x86, sparclinux, linux-s390, Alexander Schulz

CC: x86@kernel.org
CC: sparclinux@vger.kernel.org
CC: linux-s390@vger.kernel.org
CC: Alexander Schulz <alex@shark-linux.de>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/syscalls.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h
index fb726ac..6f0ad30 100644
--- a/include/trace/events/syscalls.h
+++ b/include/trace/events/syscalls.h
@@ -1,6 +1,8 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM raw_syscalls
 #define TRACE_INCLUDE_FILE syscalls
+#define TRACE_CONFIG CONFIG_FTRACE_SYSCALLS
 
 #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_EVENTS_SYSCALLS_H
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 17/18] kvm: Provide config option for enabling KVM trace events
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (15 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 16/18] Generate empty tracepoints if syscall tracing is disabled Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  0:32 ` [PATCH 18/18] Create config option for enabling IRQ tracepoints Jan Kara
  2010-03-23  1:04 ` [PATCH 0/18] Allow different tracers to be compiled independently Frederic Weisbecker
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara, kvm

CC: kvm@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/kvm.h |    2 ++
 kernel/trace/Kconfig       |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index b17d49d..c85908c 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -1,6 +1,8 @@
 #if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_MAIN_H
 
+#undef TRACE_CONFIG
+#define TRACE_CONFIG CONFIG_KVM_TRACER
 #include <linux/tracepoint.h>
 
 #undef TRACE_SYSTEM
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 88b556c..abcd529 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -517,6 +517,15 @@ config NAPI_TRACER
 
 	  If unsure, say N.
 
+config KVM_TRACER
+	bool "KVM tracing"
+	depends on KVM
+	select GENERIC_TRACER
+	help
+	  Trace lots of various events inside KVM.
+
+	  If unsure, say N.
+
 config KPROBE_EVENT
 	depends on KPROBES
 	depends on HAVE_REGS_AND_STACK_ACCESS_API
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 18/18] Create config option for enabling IRQ tracepoints
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (16 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 17/18] kvm: Provide config option for enabling KVM trace events Jan Kara
@ 2010-03-23  0:32 ` Jan Kara
  2010-03-23  1:04 ` [PATCH 0/18] Allow different tracers to be compiled independently Frederic Weisbecker
  18 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-23  0:32 UTC (permalink / raw)
  To: LKML; +Cc: Jan Kara

Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/trace/events/irq.h |    2 ++
 kernel/trace/Kconfig       |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index 0e4cfb6..dd9cdb7 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -1,5 +1,7 @@
 #undef TRACE_SYSTEM
+#undef TRACE_CONFIG
 #define TRACE_SYSTEM irq
+#define TRACE_CONFIG CONFIG_IRQ_TRACER
 
 #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_IRQ_H
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index abcd529..7893ea4 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -152,6 +152,10 @@ config FUNCTION_GRAPH_TRACER
 	  address on the current task structure into a stack of calls.
 
 
+# Config option to determine whether IRQ tracepoins should be compiled
+config IRQ_TRACER
+       bool
+
 config IRQSOFF_TRACER
 	bool "Interrupts-off Latency Tracer"
 	default n
@@ -161,6 +165,7 @@ config IRQSOFF_TRACER
 	select GENERIC_TRACER
 	select TRACER_MAX_TRACE
 	select RING_BUFFER_ALLOW_SWAP
+	select IRQ_TRACER
 	help
 	  This option measures the time spent in irqs-off critical
 	  sections, with microsecond accuracy.
@@ -183,6 +188,7 @@ config PREEMPT_TRACER
 	select GENERIC_TRACER
 	select TRACER_MAX_TRACE
 	select RING_BUFFER_ALLOW_SWAP
+	select IRQ_TRACER
 	help
 	  This option measures the time spent in preemption-off critical
 	  sections, with microsecond accuracy.
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
                   ` (17 preceding siblings ...)
  2010-03-23  0:32 ` [PATCH 18/18] Create config option for enabling IRQ tracepoints Jan Kara
@ 2010-03-23  1:04 ` Frederic Weisbecker
  2010-03-23  3:34   ` Theodore Tso
  2010-03-26  0:20   ` Jan Kara
  18 siblings, 2 replies; 40+ messages in thread
From: Frederic Weisbecker @ 2010-03-23  1:04 UTC (permalink / raw)
  To: Jan Kara, Steven Rostedt, Ingo Molnar, Thomas Gleixner, Li Zefan,
	Peter Zijlstra, Masami Hiramatsu, Mathieu Desnoyers
  Cc: LKML

On Tue, Mar 23, 2010 at 01:32:02AM +0100, Jan Kara wrote:
> 
>   Hi,
> 
>   currently, when one tracer is selected, most of tracepoints for other
> tracers also gets pulled into the kernel. So for example it's not possible
> to enable BLK_DEV_IO_TRACE without polluting slab allocation paths with
> tracepoint checks (see changelog of patch 01). This patch set adds a
> possibility for each set of trace points to be compile-enabled separately.
>   The first patch contains the necessary magic in linux/tracepoint.h. Other
> patches just tell tracing framework about correspoding config options
> and possibly introduce them if they did not exist before.
>   The patches in this patch set are actually completely independent so 
> they can be merged via respective subsystem trees. But changes are rather
> tiny so I don't expect much conflicts...
> 
> 								Honza


(Adding more people in Cc)

I don't know. Yeah this first looks like a good idea but once
CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight
thing and induce a tiny overhead, probably hard to notice, and
this is going to be even more the case after the jmp label
optimization patches.

I liked the fact we had a general tracing kernel once the above
config is selected. And we don't bother telling people that to
use tool X you need CONFIG_EVENT_Y, and you need to rebuild your
kernel, etc...

I wonder if this is going to be a win.


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints
  2010-03-23  0:32 ` [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints Jan Kara
@ 2010-03-23  1:06   ` Steven Rostedt
  2010-03-26  1:30     ` Jan Kara
  0 siblings, 1 reply; 40+ messages in thread
From: Steven Rostedt @ 2010-03-23  1:06 UTC (permalink / raw)
  To: Jan Kara; +Cc: LKML, Frederic Weisbecker, Ingo Molnar, Mathieu Desnoyers

And I thought I was nasty with the CPP macros ;-)

Added Mathieu to the Cc since he's the one that wrote the original
tracepoint code.


On Tue, 2010-03-23 at 01:32 +0100, Jan Kara wrote:
> If a particular tracer is disabled, there is no need to generate any tracepoint
> code for it. Actually, the inline checks whether tracepoints of the tracer are
> active have non-negligible impact on a code size [1] and thus can in theory
> lead to slowdown. This is undesirable when e.g. BLK_DEV_IO_TRACE should be
> enabled in the production kernel but KMEMTRACE is disabled.
> 
> So introduce a macro trickery in <linux/tracepoint.h> so that each tracer can
> define TRACE_CONFIG to CONFIG_MY_TRACER before including linux/tracepoint.h in
> it's events file and that will result in tracepoints becoming empty if
> CONFIG_MY_TRACER is not defined.
> 
> [1] As an example: bloat-o-meter mm/slub.o.untraced mm/slub.o.traced
> add/remove: 61/1 grow/shrink: 24/10 up/down: 6366/-737 (5629)
> function                                     old     new   delta
> deactivate_slab                                -     592    +592
> show_stat                                      -     380    +380
> trace_kmalloc_node                             -     265    +265
> trace_kmalloc                                  -     255    +255
> kmem_cache_alloc_node                        590     825    +235
> kmem_cache_alloc                             542     768    +226
> kfree                                        566     763    +197
> kmem_cache_free                              478     671    +193
> ...
> 
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@redhat.com>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  include/linux/tracepoint.h |   96 +++++++++++++++++++++++++++++++++++--------
>  1 files changed, 78 insertions(+), 18 deletions(-)
> 
> diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
> index f59604e..1ad17cc 100644
> --- a/include/linux/tracepoint.h
> +++ b/include/linux/tracepoint.h
> @@ -37,8 +37,7 @@ struct tracepoint {
>  
>  #define TP_PROTO(args...)	args
>  #define TP_ARGS(args...)	args
> -
> -#ifdef CONFIG_TRACEPOINTS
> +#define PARAMS(args...)		args
>  
>  /*
>   * it_func[0] is never NULL because there is at least one element in the array
> @@ -63,7 +62,7 @@ struct tracepoint {
>   * not add unwanted padding between the beginning of the section and the
>   * structure. Force alignment to the same alignment as the section start.
>   */
> -#define DECLARE_TRACE(name, proto, args)				\
> +#define DECLARE_TRACE_1(name, proto, args)				\
>  	extern struct tracepoint __tracepoint_##name;			\
>  	static inline void trace_##name(proto)				\
>  	{								\
> @@ -81,26 +80,22 @@ struct tracepoint {
>  	}
>  
> 
> -#define DEFINE_TRACE_FN(name, reg, unreg)				\
> +#define DEFINE_TRACE_FN_1(name, reg, unreg)				\
>  	static const char __tpstrtab_##name[]				\
>  	__attribute__((section("__tracepoints_strings"))) = #name;	\
>  	struct tracepoint __tracepoint_##name				\
>  	__attribute__((section("__tracepoints"), aligned(32))) =	\
>  		{ __tpstrtab_##name, 0, reg, unreg, NULL }
>  
> -#define DEFINE_TRACE(name)						\
> +#define DEFINE_TRACE_1(name)						\
>  	DEFINE_TRACE_FN(name, NULL, NULL);
>  
> -#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)				\
> +#define EXPORT_TRACEPOINT_SYMBOL_GPL_1(name)				\
>  	EXPORT_SYMBOL_GPL(__tracepoint_##name)
> -#define EXPORT_TRACEPOINT_SYMBOL(name)					\
> +#define EXPORT_TRACEPOINT_SYMBOL_1(name)				\
>  	EXPORT_SYMBOL(__tracepoint_##name)
>  
> -extern void tracepoint_update_probe_range(struct tracepoint *begin,
> -	struct tracepoint *end);
> -
> -#else /* !CONFIG_TRACEPOINTS */
> -#define DECLARE_TRACE(name, proto, args)				\
> +#define DECLARE_TRACE_0(name, proto, args)				\
>  	static inline void _do_trace_##name(struct tracepoint *tp, proto) \
>  	{ }								\
>  	static inline void trace_##name(proto)				\
> @@ -114,10 +109,51 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin,
>  		return -ENOSYS;						\
>  	}
>  
> -#define DEFINE_TRACE_FN(name, reg, unreg)
> -#define DEFINE_TRACE(name)
> -#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
> -#define EXPORT_TRACEPOINT_SYMBOL(name)
> +#define DEFINE_TRACE_FN_0(name, reg, unreg)
> +#define DEFINE_TRACE_0(name)
> +#define EXPORT_TRACEPOINT_SYMBOL_GPL_0(name)
> +#define EXPORT_TRACEPOINT_SYMBOL_0(name)
> +
> +/*
> + * Below two-level macro magic is really needed to propely expand TRACE_CONFIG
> + * macro to 0 or 1 in the end

This is a really lame comment. There should be almost as much comments
as code when doing CPP trickery like this.

> + */
> +#define __DECLARE_TRACE(config, name, proto, args) \
> +		DECLARE_TRACE_##config(name, PARAMS(proto), PARAMS(args))
> +#define __DEFINE_TRACE_FN(config, name, reg, unreg) \
> +			DEFINE_TRACE_FN_##config(name, reg, unreg)
> +#define __DEFINE_TRACE(config, name) DEFINE_TRACE_##config(name)
> +#define __EXPORT_TRACEPOINT_SYMBOL_GPL(config, name) \
> +			EXPORT_TRACEPOINT_SYMBOL_GPL_##config(name)
> +#define __EXPORT_TRACEPOINT_SYMBOL(config, name) \
> +			EXPORT_TRACEPOINT_SYMBOL_##config(name)
> +
> +#define _DECLARE_TRACE(config, name, proto, args) \
> +		__DECLARE_TRACE(config, name, PARAMS(proto), PARAMS(args))
> +#define _DEFINE_TRACE_FN(config, name, reg, unreg) \
> +			__DEFINE_TRACE_FN(config, name, reg, unreg)
> +#define _DEFINE_TRACE(config, name) __DEFINE_TRACE(config, name)
> +#define _EXPORT_TRACEPOINT_SYMBOL_GPL(config, name) \
> +			__EXPORT_TRACEPOINT_SYMBOL_GPL(config, name)
> +#define _EXPORT_TRACEPOINT_SYMBOL(config, name) \
> +			__EXPORT_TRACEPOINT_SYMBOL(config, name)
> +
> +#define DECLARE_TRACE(name, proto, args) \
> +		_DECLARE_TRACE(TRACE_CONFIG, name, PARAMS(proto), PARAMS(args))
> +#define DEFINE_TRACE_FN(name, reg, unreg) \
> +			_DEFINE_TRACE_FN(TRACE_CONFIG, name, reg, unreg)
> +#define DEFINE_TRACE(name) _DEFINE_TRACE(TRACE_CONFIG, name)
> +#define EXPORT_TRACEPOINT_SYMBOL_GPL(name) \
> +			_EXPORT_TRACEPOINT_SYMBOL_GPL(TRACE_CONFIG, name)
> +#define EXPORT_TRACEPOINT_SYMBOL(name) \
> +			_EXPORT_TRACEPOINT_SYMBOL(TRACE_CONFIG, name)
> +
> +#ifdef CONFIG_TRACEPOINTS
> +
> +extern void tracepoint_update_probe_range(struct tracepoint *begin,
> +	struct tracepoint *end);
> +
> +#else /* ! CONFIG_TRACEPOINTS */
>  
>  static inline void tracepoint_update_probe_range(struct tracepoint *begin,
>  	struct tracepoint *end)
> @@ -163,11 +199,35 @@ static inline void tracepoint_synchronize_unregister(void)
>  	synchronize_sched();
>  }
>  
> -#define PARAMS(args...) args
> -
>  #endif /* _LINUX_TRACEPOINT_H */
>  
>  /*
> + * The two chunks below are out of include file ifdef protection because
> + * we want to be able to define TRACE_CONFIG even before second or even
> + * later include of linux/tracepoint.h.
> + */
> +/*
> + * Make tracepoints which are not converted to a new method of enabling
> + * always compiled in
> + */
> +#ifndef TRACE_CONFIG
> +#define TRACE_CONFIG 1
> +#endif

Hmm, We can have tracepoints in a header. Would this still work if a
header with a tracepoint was not converted but it was included in a file
that was. Of course I haven't seen the other patches yet so I don't yet
know what a conversion looks like.

-- Steve

<
> +
> +/*
> + * If TRACE_CONFIG is defined but a config option it is defined to isn't, make
> + * the result 0. It would require much less magic if the kernel was not
> + * compiled with -Wundef.
> + */
> +#define CONFIG_TEST_1
> +#define _CONFIG_UNDEF(x) !defined(CONFIG_TEST_##x)
> +#define CONFIG_UNDEF(x) _CONFIG_UNDEF(x)
> +#if CONFIG_UNDEF(TRACE_CONFIG)
> +#undef TRACE_CONFIG
> +#define TRACE_CONFIG 0
> +#endif
> +
> +/*
>   * Note: we keep the TRACE_EVENT outside the include file ifdef protection.
>   *  This is due to the way trace events work. If a file includes two
>   *  trace event headers under one "CREATE_TRACE_POINTS" the first include



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled
  2010-03-23  0:32 ` [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled Jan Kara
@ 2010-03-23  1:07   ` Frederic Weisbecker
  2010-03-23 23:52     ` Steven Rostedt
  0 siblings, 1 reply; 40+ messages in thread
From: Frederic Weisbecker @ 2010-03-23  1:07 UTC (permalink / raw)
  To: Jan Kara; +Cc: LKML, Ingo Molnar, Peter Zijlstra

On Tue, Mar 23, 2010 at 01:32:08AM +0100, Jan Kara wrote:
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---


Note this one is an exception.
Once tracing is enabled, we need the context switch
tracer anyway to keep track of the pid:cmdline mappings.



>  include/trace/events/sched.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index cfceb0b..0a08ab1 100644
> --- a/include/trace/events/sched.h
> +++ b/include/trace/events/sched.h
> @@ -1,5 +1,7 @@
>  #undef TRACE_SYSTEM
> +#undef TRACE_CONFIG
>  #define TRACE_SYSTEM sched
> +#define TRACE_CONFIG CONFIG_CONTEXT_SWITCH_TRACER
>  
>  #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
>  #define _TRACE_SCHED_H
> -- 
> 1.6.4.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled
  2010-03-23  0:32 ` [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled Jan Kara
@ 2010-03-23  1:11   ` Johannes Berg
  2010-03-23 23:54     ` Steven Rostedt
  0 siblings, 1 reply; 40+ messages in thread
From: Johannes Berg @ 2010-03-23  1:11 UTC (permalink / raw)
  To: Jan Kara; +Cc: LKML, linux-wireless

On Tue, 2010-03-23 at 01:32 +0100, Jan Kara wrote:
> CC: linux-wireless@vger.kernel.org
> Signed-off-by: Jan Kara <jack@suse.cz>

You kinda missed something there, this patch doesn't explain to me why
and it's all I ever got to see :)

johannes


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 12/18] timer: Provide config option for enabling timer tracepoints
  2010-03-23  0:32 ` [PATCH 12/18] timer: Provide config option for enabling timer tracepoints Jan Kara
@ 2010-03-23  2:01   ` Thomas Gleixner
  2010-03-23  3:01     ` Steven Rostedt
  0 siblings, 1 reply; 40+ messages in thread
From: Thomas Gleixner @ 2010-03-23  2:01 UTC (permalink / raw)
  To: Jan Kara; +Cc: LKML, Steven Rostedt

On Tue, 23 Mar 2010, Jan Kara wrote:

> CC: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Jan Kara <jack@suse.cz>

Acked-by: Thomas Gleixner <tglx@linutronix.de>

Steven, can you pick that up please ?

> ---
>  include/trace/events/timer.h |    2 ++
>  kernel/trace/Kconfig         |    9 +++++++++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
> index 9496b96..2737598 100644
> --- a/include/trace/events/timer.h
> +++ b/include/trace/events/timer.h
> @@ -1,5 +1,7 @@
>  #undef TRACE_SYSTEM
> +#undef TRACE_CONFIG
>  #define TRACE_SYSTEM timer
> +#define TRACE_CONFIG CONFIG_TIMER_TRACER
>  
>  #if !defined(_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ)
>  #define _TRACE_TIMER_H
> diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> index a9d7e33..787f52e 100644
> --- a/kernel/trace/Kconfig
> +++ b/kernel/trace/Kconfig
> @@ -421,6 +421,15 @@ config MODULE_TRACER
>  
>  	  If unsure, say N
>  
> +config TIMER_TRACER
> +	bool "Trace timer actions"
> +	select GENERIC_TRACER
> +	help
> +	  Provide trace points for timer initialization, starting, expiring,
> +	  and canceling.
> +
> +	  If unsure, say N
> +
>  config WORKQUEUE_TRACER
>  	bool "Trace workqueues"
>  	select GENERIC_TRACER
> -- 
> 1.6.4.2
> 

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 12/18] timer: Provide config option for enabling timer tracepoints
  2010-03-23  2:01   ` Thomas Gleixner
@ 2010-03-23  3:01     ` Steven Rostedt
  0 siblings, 0 replies; 40+ messages in thread
From: Steven Rostedt @ 2010-03-23  3:01 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Jan Kara, LKML

On Tue, 2010-03-23 at 03:01 +0100, Thomas Gleixner wrote:
> On Tue, 23 Mar 2010, Jan Kara wrote:
> 
> > CC: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Jan Kara <jack@suse.cz>
> 
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> 
> Steven, can you pick that up please ?

I assume this is dependent on the first patch. I made some comments to
that one, and was hoping to get some better comments in the code before
doing anything with it.

-- Steve




^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-23  1:04 ` [PATCH 0/18] Allow different tracers to be compiled independently Frederic Weisbecker
@ 2010-03-23  3:34   ` Theodore Tso
  2010-03-23  8:05     ` Ingo Molnar
  2010-03-26  0:20   ` Jan Kara
  1 sibling, 1 reply; 40+ messages in thread
From: Theodore Tso @ 2010-03-23  3:34 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Jan Kara, Steven Rostedt, Ingo Molnar, Thomas Gleixner, Li Zefan,
	Peter Zijlstra, Masami Hiramatsu, Mathieu Desnoyers, LKML


On Mar 22, 2010, at 9:04 PM, Frederic Weisbecker wrote:
> 
> I don't know. Yeah this first looks like a good idea but once
> CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight
> thing and induce a tiny overhead, probably hard to notice, and
> this is going to be even more the case after the jmp label
> optimization patches.
> 
> I liked the fact we had a general tracing kernel once the above
> config is selected. And we don't bother telling people that to
> use tool X you need CONFIG_EVENT_Y, and you need to rebuild your
> kernel, etc...

Indeed, a lot of the value of tracepoints goes away if people are compiling kernels without them and we need to get a special "tracing kernel" installed before we can debug a problem.

So I'd hope we can do the necessary optimization work so people don't feel it's necessary to enable or disable tracepoints by subsystem....

-- Ted



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-23  3:34   ` Theodore Tso
@ 2010-03-23  8:05     ` Ingo Molnar
  2010-03-23 12:27       ` Mathieu Desnoyers
  0 siblings, 1 reply; 40+ messages in thread
From: Ingo Molnar @ 2010-03-23  8:05 UTC (permalink / raw)
  To: Theodore Tso
  Cc: Frederic Weisbecker, Jan Kara, Steven Rostedt, Thomas Gleixner,
	Li Zefan, Peter Zijlstra, Masami Hiramatsu, Mathieu Desnoyers,
	LKML


* Theodore Tso <tytso@MIT.EDU> wrote:

> 
> On Mar 22, 2010, at 9:04 PM, Frederic Weisbecker wrote:
> > 
> > I don't know. Yeah this first looks like a good idea but once 
> > CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight thing 
> > and induce a tiny overhead, probably hard to notice, and this is going to 
> > be even more the case after the jmp label optimization patches.
> > 
> > I liked the fact we had a general tracing kernel once the above config is 
> > selected. And we don't bother telling people that to use tool X you need 
> > CONFIG_EVENT_Y, and you need to rebuild your kernel, etc...
> 
> Indeed, a lot of the value of tracepoints goes away if people are compiling 
> kernels without them and we need to get a special "tracing kernel" installed 
> before we can debug a problem.
> 
> So I'd hope we can do the necessary optimization work so people don't feel 
> it's necessary to enable or disable tracepoints by subsystem....

Yeah, agreed. Ultra-embedded can disable them all, but other than that i think 
we should not make it too finegrained as a lot of tooling value is in the 
'critical mass' that tracepoints have achieved. The power events tracepoints 
are most useful when combined with scheduling events, etc.

	Ingo

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 11/18] i915: Provide config option for enabling tracepoints
  2010-03-23  0:32 ` [PATCH 11/18] i915: Provide config option for enabling tracepoints Jan Kara
@ 2010-03-23  8:42   ` Chris Wilson
  0 siblings, 0 replies; 40+ messages in thread
From: Chris Wilson @ 2010-03-23  8:42 UTC (permalink / raw)
  To: Jan Kara, LKML; +Cc: dri-devel, Jan Kara

Out of curiosity what motivated this patch? When adding the tracepoints,
I found the overhead of compiling in but not enabling them to be
insignificant, i.e. nearly unmeasurable in throughput benchmarks, so
didn't believe it warranted a config option. Especially one that advises
people to turn off what may be a useful aid in desktop systems.

Also is TRACER the right name, that would seem to confuse the option with
a standalone tracer as opposed to simply enabling tracepoints.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Cluster-devel] [PATCH 10/18] gfs2: Provide config option for enabling trace points
  2010-03-23  0:32 ` [PATCH 10/18] gfs2: Provide config option for enabling trace points Jan Kara
@ 2010-03-23 12:01   ` Steven Whitehouse
  2010-03-23 23:56     ` Steven Rostedt
  0 siblings, 1 reply; 40+ messages in thread
From: Steven Whitehouse @ 2010-03-23 12:01 UTC (permalink / raw)
  To: Jan Kara; +Cc: LKML, cluster-devel

Hi,

Now in the GFS2 -nmw git tree. Thanks,

Steve.

On Tue, 2010-03-23 at 01:32 +0100, Jan Kara wrote:
> CC: cluster-devel@redhat.com
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  fs/gfs2/Kconfig      |    8 ++++++++
>  fs/gfs2/trace_gfs2.h |    2 ++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
> index 4dcddf8..872ced2 100644
> --- a/fs/gfs2/Kconfig
> +++ b/fs/gfs2/Kconfig
> @@ -38,3 +38,11 @@ config GFS2_FS_LOCKING_DLM
>  	  Most users of GFS2 will require this. It provides the locking
>  	  interface between GFS2 and the DLM, which is required to use GFS2
>  	  in a cluster environment.
> +
> +config GFS2_TRACER
> +	bool "GFS2 tracing"
> +	depends on GFS2_FS && EVENT_TRACING
> +	help
> +	  Provide trace points in block allocation functions, locking, and
> +	  journaling code.
> +
> diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
> index 148d55c..5f4faf3 100644
> --- a/fs/gfs2/trace_gfs2.h
> +++ b/fs/gfs2/trace_gfs2.h
> @@ -1,5 +1,7 @@
>  #undef TRACE_SYSTEM
> +#undef TRACE_CONFIG
>  #define TRACE_SYSTEM gfs2
> +#define TRACE_CONFIG CONFIG_GFS2_TRACER
>  
>  #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
>  #define _TRACE_GFS2_H



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-23  8:05     ` Ingo Molnar
@ 2010-03-23 12:27       ` Mathieu Desnoyers
  2010-03-23 13:18         ` Steven Rostedt
  0 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2010-03-23 12:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Theodore Tso, Frederic Weisbecker, Jan Kara, Steven Rostedt,
	Thomas Gleixner, Li Zefan, Peter Zijlstra, Masami Hiramatsu,
	LKML, Douglas Santos

* Ingo Molnar (mingo@elte.hu) wrote:
> 
> * Theodore Tso <tytso@MIT.EDU> wrote:
> 
> > 
> > On Mar 22, 2010, at 9:04 PM, Frederic Weisbecker wrote:
> > > 
> > > I don't know. Yeah this first looks like a good idea but once 
> > > CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight thing 
> > > and induce a tiny overhead, probably hard to notice, and this is going to 
> > > be even more the case after the jmp label optimization patches.
> > > 
> > > I liked the fact we had a general tracing kernel once the above config is 
> > > selected. And we don't bother telling people that to use tool X you need 
> > > CONFIG_EVENT_Y, and you need to rebuild your kernel, etc...
> > 
> > Indeed, a lot of the value of tracepoints goes away if people are compiling 
> > kernels without them and we need to get a special "tracing kernel" installed 
> > before we can debug a problem.
> > 
> > So I'd hope we can do the necessary optimization work so people don't feel 
> > it's necessary to enable or disable tracepoints by subsystem....
> 
> Yeah, agreed. Ultra-embedded can disable them all, but other than that i think 
> we should not make it too finegrained as a lot of tooling value is in the 
> 'critical mass' that tracepoints have achieved. The power events tracepoints 
> are most useful when combined with scheduling events, etc.
> 

We're in complete agreement here. When I considered if it was worth it to create
such a per-tracepoint group compile-time disabling in the first place, I decided
not to do it precisely due to the added-value that comes with the availability
of system-wide tracepoints. And I think with the static jump patching, we are
now at a point where the overhead is stunningly low.

Now, space-wise, the one thing I would consider appropriate as a compromise for
small embedded systems would be to allow the TRACE_EVENT probes to be compiled
as modules.

Thanks,

Mathieu


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-23 12:27       ` Mathieu Desnoyers
@ 2010-03-23 13:18         ` Steven Rostedt
  0 siblings, 0 replies; 40+ messages in thread
From: Steven Rostedt @ 2010-03-23 13:18 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Ingo Molnar, Theodore Tso, Frederic Weisbecker, Jan Kara,
	Thomas Gleixner, Li Zefan, Peter Zijlstra, Masami Hiramatsu,
	LKML, Douglas Santos

On Tue, 2010-03-23 at 08:27 -0400, Mathieu Desnoyers wrote:
> * Ingo Molnar (mingo@elte.hu) wrote:
> > 

> 
> We're in complete agreement here. When I considered if it was worth it to create
> such a per-tracepoint group compile-time disabling in the first place, I decided
> not to do it precisely due to the added-value that comes with the availability
> of system-wide tracepoints. And I think with the static jump patching, we are
> now at a point where the overhead is stunningly low.
> 
> Now, space-wise, the one thing I would consider appropriate as a compromise for
> small embedded systems would be to allow the TRACE_EVENT probes to be compiled
> as modules.

Yeah, I agree here. Hmm, I wonder if we could automate this. That is, we
could now, create a module per trace system if it is so configured. It
would move the functions that create, record and output the trace points
in TRACE_EVENT() into a separate module. Then you just need to load the
modules you want to trace (grouped by system).

We can make add kobjects to /sys so that udev loads them automatically
for distros.

-- Steve




^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled
  2010-03-23  1:07   ` Frederic Weisbecker
@ 2010-03-23 23:52     ` Steven Rostedt
  2010-03-24  0:31       ` Frederic Weisbecker
  0 siblings, 1 reply; 40+ messages in thread
From: Steven Rostedt @ 2010-03-23 23:52 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: Jan Kara, LKML, Ingo Molnar, Peter Zijlstra

On Tue, 2010-03-23 at 02:07 +0100, Frederic Weisbecker wrote:
> On Tue, Mar 23, 2010 at 01:32:08AM +0100, Jan Kara wrote:
> > CC: Ingo Molnar <mingo@elte.hu>
> > CC: Peter Zijlstra <peterz@infradead.org>
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> 
> 
> Note this one is an exception.
> Once tracing is enabled, we need the context switch
> tracer anyway to keep track of the pid:cmdline mappings.
> 
> 

Yes, the scheduling tracepoints are needed by several tracers. This must
be enabled by all.

But then again, I'm thinking it would be nicer to find a way to lower
the impact than just turning them off.

Perhaps only allow the individual disabling if CONFIG_EMBEDDED is set.

-- Steve



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled
  2010-03-23  1:11   ` Johannes Berg
@ 2010-03-23 23:54     ` Steven Rostedt
  0 siblings, 0 replies; 40+ messages in thread
From: Steven Rostedt @ 2010-03-23 23:54 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Jan Kara, LKML, linux-wireless

On Mon, 2010-03-22 at 18:11 -0700, Johannes Berg wrote:
> On Tue, 2010-03-23 at 01:32 +0100, Jan Kara wrote:
> > CC: linux-wireless@vger.kernel.org
> > Signed-off-by: Jan Kara <jack@suse.cz>
> 
> You kinda missed something there, this patch doesn't explain to me why
> and it's all I ever got to see :)

This patch set is about fine grained tuning of what tracepoints get
enabled and which don't. I honestly think that this should only be
permitted if CONFIG_EMBEDDED is set (if it should be permitted at all). 

I would much rather find a way to lower the tracepoint footprint than to
pick and choose what tracepoints get enabled.

-- Steve



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Cluster-devel] [PATCH 10/18] gfs2: Provide config option for enabling trace points
  2010-03-23 12:01   ` [Cluster-devel] " Steven Whitehouse
@ 2010-03-23 23:56     ` Steven Rostedt
  2010-03-24 11:20       ` Steven Whitehouse
  0 siblings, 1 reply; 40+ messages in thread
From: Steven Rostedt @ 2010-03-23 23:56 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: Jan Kara, LKML, cluster-devel

On Tue, 2010-03-23 at 12:01 +0000, Steven Whitehouse wrote:
> Hi,
> 
> Now in the GFS2 -nmw git tree. Thanks,
> 

Note, this depends on patch 1 which we have not yet determined if it
should be applied or not.

-- Steve

> Steve.
> 
> On Tue, 2010-03-23 at 01:32 +0100, Jan Kara wrote:
> > CC: cluster-devel@redhat.com
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> >  fs/gfs2/Kconfig      |    8 ++++++++
> >  fs/gfs2/trace_gfs2.h |    2 ++
> >  2 files changed, 10 insertions(+), 0 deletions(-)
> > 
> > diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
> > index 4dcddf8..872ced2 100644
> > --- a/fs/gfs2/Kconfig
> > +++ b/fs/gfs2/Kconfig
> > @@ -38,3 +38,11 @@ config GFS2_FS_LOCKING_DLM
> >  	  Most users of GFS2 will require this. It provides the locking
> >  	  interface between GFS2 and the DLM, which is required to use GFS2
> >  	  in a cluster environment.
> > +
> > +config GFS2_TRACER
> > +	bool "GFS2 tracing"
> > +	depends on GFS2_FS && EVENT_TRACING
> > +	help
> > +	  Provide trace points in block allocation functions, locking, and
> > +	  journaling code.
> > +
> > diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
> > index 148d55c..5f4faf3 100644
> > --- a/fs/gfs2/trace_gfs2.h
> > +++ b/fs/gfs2/trace_gfs2.h
> > @@ -1,5 +1,7 @@
> >  #undef TRACE_SYSTEM
> > +#undef TRACE_CONFIG
> >  #define TRACE_SYSTEM gfs2
> > +#define TRACE_CONFIG CONFIG_GFS2_TRACER
> >  
> >  #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
> >  #define _TRACE_GFS2_H
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled
  2010-03-23 23:52     ` Steven Rostedt
@ 2010-03-24  0:31       ` Frederic Weisbecker
  0 siblings, 0 replies; 40+ messages in thread
From: Frederic Weisbecker @ 2010-03-24  0:31 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Jan Kara, LKML, Ingo Molnar, Peter Zijlstra

On Tue, Mar 23, 2010 at 07:52:01PM -0400, Steven Rostedt wrote:
> On Tue, 2010-03-23 at 02:07 +0100, Frederic Weisbecker wrote:
> > On Tue, Mar 23, 2010 at 01:32:08AM +0100, Jan Kara wrote:
> > > CC: Ingo Molnar <mingo@elte.hu>
> > > CC: Peter Zijlstra <peterz@infradead.org>
> > > Signed-off-by: Jan Kara <jack@suse.cz>
> > > ---
> > 
> > 
> > Note this one is an exception.
> > Once tracing is enabled, we need the context switch
> > tracer anyway to keep track of the pid:cmdline mappings.
> > 
> > 
> 
> Yes, the scheduling tracepoints are needed by several tracers. This must
> be enabled by all.
> 
> But then again, I'm thinking it would be nicer to find a way to lower
> the impact than just turning them off.
> 
> Perhaps only allow the individual disabling if CONFIG_EMBEDDED is set.


Yeah agreed!


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Cluster-devel] [PATCH 10/18] gfs2: Provide config option for enabling trace points
  2010-03-23 23:56     ` Steven Rostedt
@ 2010-03-24 11:20       ` Steven Whitehouse
  2010-03-24 12:09         ` Steven Rostedt
  0 siblings, 1 reply; 40+ messages in thread
From: Steven Whitehouse @ 2010-03-24 11:20 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Jan Kara, LKML, cluster-devel

Hi,

On Tue, 2010-03-23 at 19:56 -0400, Steven Rostedt wrote:
> On Tue, 2010-03-23 at 12:01 +0000, Steven Whitehouse wrote:
> > Hi,
> > 
> > Now in the GFS2 -nmw git tree. Thanks,
> > 
> 
> Note, this depends on patch 1 which we have not yet determined if it
> should be applied or not.
> 
> -- Steve
> 
Sorry, I think I misread the initial message. I can roll it out again if
required. I did a compile test in both states though and it seemed to
work for me,

Steve.



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Cluster-devel] [PATCH 10/18] gfs2: Provide config option for enabling trace points
  2010-03-24 11:20       ` Steven Whitehouse
@ 2010-03-24 12:09         ` Steven Rostedt
  0 siblings, 0 replies; 40+ messages in thread
From: Steven Rostedt @ 2010-03-24 12:09 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: Jan Kara, LKML, cluster-devel

On Wed, 2010-03-24 at 11:20 +0000, Steven Whitehouse wrote:
> Hi,
> 
> On Tue, 2010-03-23 at 19:56 -0400, Steven Rostedt wrote:
> > On Tue, 2010-03-23 at 12:01 +0000, Steven Whitehouse wrote:
> > > Hi,
> > > 
> > > Now in the GFS2 -nmw git tree. Thanks,
> > > 
> > 
> > Note, this depends on patch 1 which we have not yet determined if it
> > should be applied or not.
> > 
> > -- Steve
> > 
> Sorry, I think I misread the initial message. I can roll it out again if
> required. I did a compile test in both states though and it seemed to
> work for me,
> 

No problem, I'm just saying I believe without the first patch, this is a
nop. That is, both states have the same result. The trace events stay
in.

-- Steve



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-23  1:04 ` [PATCH 0/18] Allow different tracers to be compiled independently Frederic Weisbecker
  2010-03-23  3:34   ` Theodore Tso
@ 2010-03-26  0:20   ` Jan Kara
  2010-03-26 19:09     ` Frederic Weisbecker
  1 sibling, 1 reply; 40+ messages in thread
From: Jan Kara @ 2010-03-26  0:20 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Jan Kara, Steven Rostedt, Ingo Molnar, Thomas Gleixner, Li Zefan,
	Peter Zijlstra, Masami Hiramatsu, Mathieu Desnoyers, LKML

On Tue 23-03-10 02:04:21, Frederic Weisbecker wrote:
> On Tue, Mar 23, 2010 at 01:32:02AM +0100, Jan Kara wrote:
> > 
> >   Hi,
> > 
> >   currently, when one tracer is selected, most of tracepoints for other
> > tracers also gets pulled into the kernel. So for example it's not possible
> > to enable BLK_DEV_IO_TRACE without polluting slab allocation paths with
> > tracepoint checks (see changelog of patch 01). This patch set adds a
> > possibility for each set of trace points to be compile-enabled separately.
> >   The first patch contains the necessary magic in linux/tracepoint.h. Other
> > patches just tell tracing framework about correspoding config options
> > and possibly introduce them if they did not exist before.
> >   The patches in this patch set are actually completely independent so 
> > they can be merged via respective subsystem trees. But changes are rather
> > tiny so I don't expect much conflicts...
> > 
> > 								Honza
> 
> (Adding more people in Cc)
> 
> I don't know. Yeah this first looks like a good idea but once
> CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight
> thing and induce a tiny overhead, probably hard to notice, and
> this is going to be even more the case after the jmp label
> optimization patches.
  Sorry for replying late, I was on vacation. My motivation was that we
wanted BLK_DEV_IO_TRACE enabled in all our distro kernels but there is
a concern that this could have some impact on performance especially
in SLAB allocator due to more icache pressure or so. This is not completely
bogus concern if you look at bloat-o-meter output. For example:
function                                     old     new   delta
kmem_cache_alloc                             542     768    +226

  But looking at the disassembly now, I can see that the difference in
inline code is actually only ~40 bytes (on x86_64) - so that's about 7%.
Not a huge deal but still noticeable. 

> I liked the fact we had a general tracing kernel once the above
> config is selected. And we don't bother telling people that to
> use tool X you need CONFIG_EVENT_Y, and you need to rebuild your
> kernel, etc...
  OK, I understand this. I guess I should go and measure whether disabling
tracepoints really makes some performance difference or not.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints
  2010-03-23  1:06   ` Steven Rostedt
@ 2010-03-26  1:30     ` Jan Kara
  0 siblings, 0 replies; 40+ messages in thread
From: Jan Kara @ 2010-03-26  1:30 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Jan Kara, LKML, Frederic Weisbecker, Ingo Molnar, Mathieu Desnoyers

On Mon 22-03-10 21:06:49, Steven Rostedt wrote:
> And I thought I was nasty with the CPP macros ;-)
  Yeah, this is the darkest magic I've ever conceived with CPP ;)

...
> > -#define DEFINE_TRACE_FN(name, reg, unreg)
> > -#define DEFINE_TRACE(name)
> > -#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
> > -#define EXPORT_TRACEPOINT_SYMBOL(name)
> > +#define DEFINE_TRACE_FN_0(name, reg, unreg)
> > +#define DEFINE_TRACE_0(name)
> > +#define EXPORT_TRACEPOINT_SYMBOL_GPL_0(name)
> > +#define EXPORT_TRACEPOINT_SYMBOL_0(name)
> > +
> > +/*
> > + * Below two-level macro magic is really needed to propely expand TRACE_CONFIG
> > + * macro to 0 or 1 in the end
> 
> This is a really lame comment. There should be almost as much comments
> as code when doing CPP trickery like this.
  OK, I'll expand it with a bit of CPP theory about argument expansion.

> > + */
> > +#define __DECLARE_TRACE(config, name, proto, args) \
> > +		DECLARE_TRACE_##config(name, PARAMS(proto), PARAMS(args))
> > +#define __DEFINE_TRACE_FN(config, name, reg, unreg) \
> > +			DEFINE_TRACE_FN_##config(name, reg, unreg)
> > +#define __DEFINE_TRACE(config, name) DEFINE_TRACE_##config(name)
> > +#define __EXPORT_TRACEPOINT_SYMBOL_GPL(config, name) \
> > +			EXPORT_TRACEPOINT_SYMBOL_GPL_##config(name)
> > +#define __EXPORT_TRACEPOINT_SYMBOL(config, name) \
> > +			EXPORT_TRACEPOINT_SYMBOL_##config(name)
> > +
> > +#define _DECLARE_TRACE(config, name, proto, args) \
> > +		__DECLARE_TRACE(config, name, PARAMS(proto), PARAMS(args))
> > +#define _DEFINE_TRACE_FN(config, name, reg, unreg) \
> > +			__DEFINE_TRACE_FN(config, name, reg, unreg)
> > +#define _DEFINE_TRACE(config, name) __DEFINE_TRACE(config, name)
> > +#define _EXPORT_TRACEPOINT_SYMBOL_GPL(config, name) \
> > +			__EXPORT_TRACEPOINT_SYMBOL_GPL(config, name)
> > +#define _EXPORT_TRACEPOINT_SYMBOL(config, name) \
> > +			__EXPORT_TRACEPOINT_SYMBOL(config, name)
> > +
> > +#define DECLARE_TRACE(name, proto, args) \
> > +		_DECLARE_TRACE(TRACE_CONFIG, name, PARAMS(proto), PARAMS(args))
> > +#define DEFINE_TRACE_FN(name, reg, unreg) \
> > +			_DEFINE_TRACE_FN(TRACE_CONFIG, name, reg, unreg)
> > +#define DEFINE_TRACE(name) _DEFINE_TRACE(TRACE_CONFIG, name)
> > +#define EXPORT_TRACEPOINT_SYMBOL_GPL(name) \
> > +			_EXPORT_TRACEPOINT_SYMBOL_GPL(TRACE_CONFIG, name)
> > +#define EXPORT_TRACEPOINT_SYMBOL(name) \
> > +			_EXPORT_TRACEPOINT_SYMBOL(TRACE_CONFIG, name)
...
> >  /*
> > + * The two chunks below are out of include file ifdef protection because
> > + * we want to be able to define TRACE_CONFIG even before second or even
> > + * later include of linux/tracepoint.h.
> > + */
> > +/*
> > + * Make tracepoints which are not converted to a new method of enabling
> > + * always compiled in
> > + */
> > +#ifndef TRACE_CONFIG
> > +#define TRACE_CONFIG 1
> > +#endif
> 
> Hmm, We can have tracepoints in a header. Would this still work if a
> header with a tracepoint was not converted but it was included in a file
> that was. Of course I haven't seen the other patches yet so I don't yet
> know what a conversion looks like.
  Well, if TRACE_CONFIG is not defined while the header is included,
everything is fine. If TRACE_CONFIG would be defined, then it means that
TRACE_SYSTEM is defined as well (I tried to define them at the same place)
and thus either tracepoints belong to the same system - again fine - or
they belong to a different system. But then the header would redefine
TRACE_SYSTEM which would subsequently break the file which included the
header. So what I do should work, unless TRACE_SYSTEM is already broken...
  Maybe I can expand the reasoning in the comment.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/18] Allow different tracers to be compiled independently
  2010-03-26  0:20   ` Jan Kara
@ 2010-03-26 19:09     ` Frederic Weisbecker
  0 siblings, 0 replies; 40+ messages in thread
From: Frederic Weisbecker @ 2010-03-26 19:09 UTC (permalink / raw)
  To: Jan Kara
  Cc: Steven Rostedt, Ingo Molnar, Thomas Gleixner, Li Zefan,
	Peter Zijlstra, Masami Hiramatsu, Mathieu Desnoyers, LKML

On Fri, Mar 26, 2010 at 01:20:29AM +0100, Jan Kara wrote:
> On Tue 23-03-10 02:04:21, Frederic Weisbecker wrote:
> > On Tue, Mar 23, 2010 at 01:32:02AM +0100, Jan Kara wrote:
> > > 
> > >   Hi,
> > > 
> > >   currently, when one tracer is selected, most of tracepoints for other
> > > tracers also gets pulled into the kernel. So for example it's not possible
> > > to enable BLK_DEV_IO_TRACE without polluting slab allocation paths with
> > > tracepoint checks (see changelog of patch 01). This patch set adds a
> > > possibility for each set of trace points to be compile-enabled separately.
> > >   The first patch contains the necessary magic in linux/tracepoint.h. Other
> > > patches just tell tracing framework about correspoding config options
> > > and possibly introduce them if they did not exist before.
> > >   The patches in this patch set are actually completely independent so 
> > > they can be merged via respective subsystem trees. But changes are rather
> > > tiny so I don't expect much conflicts...
> > > 
> > > 								Honza
> > 
> > (Adding more people in Cc)
> > 
> > I don't know. Yeah this first looks like a good idea but once
> > CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight
> > thing and induce a tiny overhead, probably hard to notice, and
> > this is going to be even more the case after the jmp label
> > optimization patches.
>   Sorry for replying late, I was on vacation. My motivation was that we
> wanted BLK_DEV_IO_TRACE enabled in all our distro kernels but there is
> a concern that this could have some impact on performance especially
> in SLAB allocator due to more icache pressure or so. This is not completely
> bogus concern if you look at bloat-o-meter output. For example:
> function                                     old     new   delta
> kmem_cache_alloc                             542     768    +226
> 
>   But looking at the disassembly now, I can see that the difference in
> inline code is actually only ~40 bytes (on x86_64) - so that's about 7%.
> Not a huge deal but still noticeable. 
> 
> > I liked the fact we had a general tracing kernel once the above
> > config is selected. And we don't bother telling people that to
> > use tool X you need CONFIG_EVENT_Y, and you need to rebuild your
> > kernel, etc...
>   OK, I understand this. I guess I should go and measure whether disabling
> tracepoints really makes some performance difference or not.



If you do so, please try with with the jmp label patches:
http://lwn.net/Articles/379776/


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2010-03-26 19:09 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23  0:32 [PATCH 0/18] Allow different tracers to be compiled independently Jan Kara
2010-03-23  0:32 ` [PATCH 01/18] trace: Allow <linux/tracepoint.h> to create empty tracepoints Jan Kara
2010-03-23  1:06   ` Steven Rostedt
2010-03-26  1:30     ` Jan Kara
2010-03-23  0:32 ` [PATCH 02/18] block: Generate blktrace trace points only if blktrace is enabled Jan Kara
2010-03-23  0:32 ` [PATCH 03/18] mm: Generate kmemtrace trace points only if they are enabled Jan Kara
2010-03-23  0:32 ` [PATCH 04/18] mac80211: Generate trace points only if api tracer enabled Jan Kara
2010-03-23  1:11   ` Johannes Berg
2010-03-23 23:54     ` Steven Rostedt
2010-03-23  0:32 ` [PATCH 05/18] workqueue: Generate trace points only when workqueue " Jan Kara
2010-03-23  0:32 ` [PATCH 06/18] sched: Generate trace points only if scheduler tracing is enabled Jan Kara
2010-03-23  1:07   ` Frederic Weisbecker
2010-03-23 23:52     ` Steven Rostedt
2010-03-24  0:31       ` Frederic Weisbecker
2010-03-23  0:32 ` [PATCH 07/18] ext4: Provide config options for enabling ext4 and jbd2 tracing Jan Kara
2010-03-23  0:32 ` [PATCH 08/18] lockdep: Provide config option for enabling lock tracepoints Jan Kara
2010-03-23  0:32 ` [PATCH 09/18] module: Provide config option to enable tracing of module load / unload Jan Kara
2010-03-23  0:32 ` [PATCH 10/18] gfs2: Provide config option for enabling trace points Jan Kara
2010-03-23 12:01   ` [Cluster-devel] " Steven Whitehouse
2010-03-23 23:56     ` Steven Rostedt
2010-03-24 11:20       ` Steven Whitehouse
2010-03-24 12:09         ` Steven Rostedt
2010-03-23  0:32 ` [PATCH 11/18] i915: Provide config option for enabling tracepoints Jan Kara
2010-03-23  8:42   ` Chris Wilson
2010-03-23  0:32 ` [PATCH 12/18] timer: Provide config option for enabling timer tracepoints Jan Kara
2010-03-23  2:01   ` Thomas Gleixner
2010-03-23  3:01     ` Steven Rostedt
2010-03-23  0:32 ` [PATCH 13/18] acpi: Provide config option to enable power tracepoints Jan Kara
2010-03-23  0:32 ` [PATCH 14/18] net: Provide config option for enabling SKB tracing Jan Kara
2010-03-23  0:32 ` [PATCH 15/18] net: Provide config option for enabling NAPI tracing Jan Kara
2010-03-23  0:32 ` [PATCH 16/18] Generate empty tracepoints if syscall tracing is disabled Jan Kara
2010-03-23  0:32 ` [PATCH 17/18] kvm: Provide config option for enabling KVM trace events Jan Kara
2010-03-23  0:32 ` [PATCH 18/18] Create config option for enabling IRQ tracepoints Jan Kara
2010-03-23  1:04 ` [PATCH 0/18] Allow different tracers to be compiled independently Frederic Weisbecker
2010-03-23  3:34   ` Theodore Tso
2010-03-23  8:05     ` Ingo Molnar
2010-03-23 12:27       ` Mathieu Desnoyers
2010-03-23 13:18         ` Steven Rostedt
2010-03-26  0:20   ` Jan Kara
2010-03-26 19:09     ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).