* [PATCH] [media] v4l2: move tracepoint generation into separate file
@ 2015-08-06 12:38 Philipp Zabel
2015-08-06 13:23 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2015-08-06 12:38 UTC (permalink / raw)
To: Hans Verkuil
Cc: Steven Rostedt, Mauro Carvalho Chehab, linux-media, kernel,
Philipp Zabel
To compile videobuf2-core as a module, the vb2_* tracepoints must be
exported from the videodev module. Instead of exporting vb2 tracepoint
symbols from v4l2-ioctl.c, move the tracepoint generation into a separate
file. This patch fixes the following build error in the modpost stage,
introduced by 2091f5181c66 ("[media] videobuf2: add trace events"):
ERROR: "__tracepoint_vb2_buf_done" undefined!
ERROR: "__tracepoint_vb2_dqbuf" undefined!
ERROR: "__tracepoint_vb2_qbuf" undefined!
ERROR: "__tracepoint_vb2_buf_queue" undefined!
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/media/v4l2-core/Makefile | 3 +++
drivers/media/v4l2-core/v4l2-ioctl.c | 1 -
drivers/media/v4l2-core/v4l2-trace.c | 11 +++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 drivers/media/v4l2-core/v4l2-trace.c
diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile
index dc3de00..d1dd440 100644
--- a/drivers/media/v4l2-core/Makefile
+++ b/drivers/media/v4l2-core/Makefile
@@ -13,6 +13,9 @@ endif
ifeq ($(CONFIG_OF),y)
videodev-objs += v4l2-of.o
endif
+ifeq ($(CONFIG_TRACEPOINTS),y)
+ videodev-objs += v4l2-trace.o
+endif
obj-$(CONFIG_VIDEO_V4L2) += videodev.o
obj-$(CONFIG_VIDEO_V4L2) += v4l2-common.o
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 85de455..038d8c0 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -28,7 +28,6 @@
#include <media/v4l2-device.h>
#include <media/videobuf2-core.h>
-#define CREATE_TRACE_POINTS
#include <trace/events/v4l2.h>
/* Zero out the end of the struct pointed to by p. Everything after, but
diff --git a/drivers/media/v4l2-core/v4l2-trace.c b/drivers/media/v4l2-core/v4l2-trace.c
new file mode 100644
index 0000000..ae10b02
--- /dev/null
+++ b/drivers/media/v4l2-core/v4l2-trace.c
@@ -0,0 +1,11 @@
+#include <media/v4l2-common.h>
+#include <media/v4l2-fh.h>
+#include <media/videobuf2-core.h>
+
+#define CREATE_TRACE_POINTS
+#include <trace/events/v4l2.h>
+
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_buf_done);
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_buf_queue);
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_dqbuf);
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_qbuf);
--
2.4.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] v4l2: move tracepoint generation into separate file
2015-08-06 12:38 [PATCH] [media] v4l2: move tracepoint generation into separate file Philipp Zabel
@ 2015-08-06 13:23 ` Steven Rostedt
2015-08-06 15:44 ` Philipp Zabel
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2015-08-06 13:23 UTC (permalink / raw)
To: Philipp Zabel; +Cc: Hans Verkuil, Mauro Carvalho Chehab, linux-media, kernel
On Thu, 6 Aug 2015 14:38:02 +0200
Philipp Zabel <p.zabel@pengutronix.de> wrote:
> To compile videobuf2-core as a module, the vb2_* tracepoints must be
> exported from the videodev module. Instead of exporting vb2 tracepoint
> symbols from v4l2-ioctl.c, move the tracepoint generation into a separate
> file. This patch fixes the following build error in the modpost stage,
> introduced by 2091f5181c66 ("[media] videobuf2: add trace events"):
>
> ERROR: "__tracepoint_vb2_buf_done" undefined!
> ERROR: "__tracepoint_vb2_dqbuf" undefined!
> ERROR: "__tracepoint_vb2_qbuf" undefined!
> ERROR: "__tracepoint_vb2_buf_queue" undefined!
>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
;-)
-- Steve
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] v4l2: move tracepoint generation into separate file
2015-08-06 13:23 ` Steven Rostedt
@ 2015-08-06 15:44 ` Philipp Zabel
0 siblings, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2015-08-06 15:44 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Hans Verkuil, Mauro Carvalho Chehab, linux-media, kernel
Am Donnerstag, den 06.08.2015, 09:23 -0400 schrieb Steven Rostedt:
> On Thu, 6 Aug 2015 14:38:02 +0200
> Philipp Zabel <p.zabel@pengutronix.de> wrote:
>
> > To compile videobuf2-core as a module, the vb2_* tracepoints must be
> > exported from the videodev module. Instead of exporting vb2 tracepoint
> > symbols from v4l2-ioctl.c, move the tracepoint generation into a separate
> > file. This patch fixes the following build error in the modpost stage,
> > introduced by 2091f5181c66 ("[media] videobuf2: add trace events"):
> >
> > ERROR: "__tracepoint_vb2_buf_done" undefined!
> > ERROR: "__tracepoint_vb2_dqbuf" undefined!
> > ERROR: "__tracepoint_vb2_qbuf" undefined!
> > ERROR: "__tracepoint_vb2_buf_queue" undefined!
> >
>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
>
> ;-)
Indeed, thank you.
regards
Philipp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-06 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 12:38 [PATCH] [media] v4l2: move tracepoint generation into separate file Philipp Zabel
2015-08-06 13:23 ` Steven Rostedt
2015-08-06 15:44 ` Philipp Zabel
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).