From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] tracing: fix TRACE_EVENT power tracepoint creation
Date: Wed, 27 Oct 2010 22:16:32 -0400 [thread overview]
Message-ID: <20101028021632.GA18117@Krystal> (raw)
DEFINE_TRACE should also exist when CONFIG_EVENT_TRACING=n. Otherwise, setting
only TRACEPOINTS=y is broken.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
kernel/Makefile | 1 +
kernel/trace/Makefile | 2 +-
kernel/trace/power-traces.c | 6 ++++++
3 files changed, 8 insertions(+), 1 deletion(-)
Index: linux-2.6-lttng/kernel/Makefile
===================================================================
--- linux-2.6-lttng.orig/kernel/Makefile
+++ linux-2.6-lttng/kernel/Makefile
@@ -93,6 +93,7 @@ obj-$(CONFIG_TASKSTATS) += taskstats.o t
obj-$(USE_IMMEDIATE) += immediate.o
obj-$(CONFIG_MARKERS) += marker.o
obj-$(CONFIG_TRACEPOINTS) += tracepoint.o
+obj-$(CONFIG_TRACEPOINTS) += trace/
obj-$(CONFIG_LATENCYTOP) += latencytop.o
obj-$(CONFIG_BINFMT_ELF) += elfcore.o
obj-$(CONFIG_COMPAT_BINFMT_ELF) += elfcore.o
Index: linux-2.6-lttng/kernel/trace/Makefile
===================================================================
--- linux-2.6-lttng.orig/kernel/trace/Makefile
+++ linux-2.6-lttng/kernel/trace/Makefile
@@ -52,7 +52,7 @@ obj-$(CONFIG_EVENT_TRACING) += trace_eve
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
Index: linux-2.6-lttng/kernel/trace/power-traces.c
===================================================================
--- linux-2.6-lttng.orig/kernel/trace/power-traces.c
+++ linux-2.6-lttng/kernel/trace/power-traces.c
@@ -10,8 +10,14 @@
#include <linux/sched.h>
#include <linux/module.h>
+#ifdef CONFIG_EVENT_TRACING
#define CREATE_TRACE_POINTS
#include <trace/events/power.h>
+#else
+DEFINE_TRACE(power_start);
+DEFINE_TRACE(power_end);
+DEFINE_TRACE(power_frequency);
+#endif
EXPORT_TRACEPOINT_SYMBOL_GPL(power_frequency);
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next reply other threads:[~2010-10-28 2:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 2:16 Mathieu Desnoyers [this message]
2010-10-28 2:25 ` [PATCH] tracing: fix TRACE_EVENT power tracepoint creation Steven Rostedt
2010-10-28 11:03 ` Mathieu Desnoyers
2010-10-28 12:53 ` Steven Rostedt
2010-10-28 13:17 ` Mathieu Desnoyers
2010-10-28 14:33 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101028021632.GA18117@Krystal \
--to=mathieu.desnoyers@efficios.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.