From 2d01237389dc64b37745ce87e64d6808b6eed582 Mon Sep 17 00:00:00 2001 From: Wade Farnsworth Date: Fri, 22 Nov 2013 16:48:28 -0300 Subject: [media] v4l2-dev: Add tracepoints for QBUF and DQBUF Add tracepoints to the QBUF and DQBUF ioctls to enable rudimentary performance measurements using standard kernel tracers. [m.chehab@samsung.com: CodingStyle fixes (whitespacing)] Signed-off-by: Wade Farnsworth Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-dev.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/media/v4l2-core/v4l2-dev.c') diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index b5aaaac427ad..1cc17496b202 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c @@ -31,6 +31,10 @@ #include #include + +#define CREATE_TRACE_POINTS +#include + #define VIDEO_NUM_DEVICES 256 #define VIDEO_NAME "video4linux" @@ -391,6 +395,11 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) } else ret = -ENOTTY; + if (cmd == VIDIOC_DQBUF) + trace_v4l2_dqbuf(vdev->minor, (struct v4l2_buffer *)arg); + else if (cmd == VIDIOC_QBUF) + trace_v4l2_qbuf(vdev->minor, (struct v4l2_buffer *)arg); + return ret; } -- cgit v1.2.1