summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-dev.c
diff options
context:
space:
mode:
authorWade Farnsworth <wade_farnsworth@mentor.com>2013-11-22 16:48:28 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-12-10 15:53:43 -0200
commit2d01237389dc64b37745ce87e64d6808b6eed582 (patch)
tree389363779cc318263f2df0354f610c3cb9a06127 /drivers/media/v4l2-core/v4l2-dev.c
parent324ed533bf0b23c309b805272c4ffcc5d51493a6 (diff)
downloadblackbird-op-linux-2d01237389dc64b37745ce87e64d6808b6eed582.tar.gz
blackbird-op-linux-2d01237389dc64b37745ce87e64d6808b6eed582.zip
[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 <wade_farnsworth@mentor.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-dev.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-dev.c9
1 files changed, 9 insertions, 0 deletions
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 <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
+
+#define CREATE_TRACE_POINTS
+#include <trace/events/v4l2.h>
+
#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;
}
OpenPOWER on IntegriCloud