diff options
author | Wade Farnsworth <wade_farnsworth@mentor.com> | 2013-11-22 14:48:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-12-10 12:53:43 -0500 |
commit | 2d01237389dc64b37745ce87e64d6808b6eed582 (patch) | |
tree | 389363779cc318263f2df0354f610c3cb9a06127 /drivers/media/v4l2-core | |
parent | 324ed533bf0b23c309b805272c4ffcc5d51493a6 (diff) |
[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')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-dev.c | 9 |
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 @@ | |||
31 | #include <media/v4l2-device.h> | 31 | #include <media/v4l2-device.h> |
32 | #include <media/v4l2-ioctl.h> | 32 | #include <media/v4l2-ioctl.h> |
33 | 33 | ||
34 | |||
35 | #define CREATE_TRACE_POINTS | ||
36 | #include <trace/events/v4l2.h> | ||
37 | |||
34 | #define VIDEO_NUM_DEVICES 256 | 38 | #define VIDEO_NUM_DEVICES 256 |
35 | #define VIDEO_NAME "video4linux" | 39 | #define VIDEO_NAME "video4linux" |
36 | 40 | ||
@@ -391,6 +395,11 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
391 | } else | 395 | } else |
392 | ret = -ENOTTY; | 396 | ret = -ENOTTY; |
393 | 397 | ||
398 | if (cmd == VIDIOC_DQBUF) | ||
399 | trace_v4l2_dqbuf(vdev->minor, (struct v4l2_buffer *)arg); | ||
400 | else if (cmd == VIDIOC_QBUF) | ||
401 | trace_v4l2_qbuf(vdev->minor, (struct v4l2_buffer *)arg); | ||
402 | |||
394 | return ret; | 403 | return ret; |
395 | } | 404 | } |
396 | 405 | ||