All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Deborah Brouwer <deborah.brouwer@collabora.com>,
	linux-media@vger.kernel.org
Cc: daniel.almeida@collabora.com, nfraprado@collabora.com,
	nicolas.dufresne@collabora.com, deborahbrouwer3563@gmail.com
Subject: Re: [PATCH] utils: add v4l2-tracer utility
Date: Thu, 22 Sep 2022 10:20:25 +0200	[thread overview]
Message-ID: <6a0b8be9-7486-3f22-1181-af61f6559f30@xs4all.nl> (raw)
In-Reply-To: <20220917022947.141330-1-deborah.brouwer@collabora.com>

Hi Deb,

On 17/09/2022 04:29, Deborah Brouwer wrote:
> The v4l2-tracer utility traces, records and replays userspace applications
> that implement the v4l2 memory-to-memory stateless video decoder
> interface. The trace function intercepts and copies all system calls,
> stateless codec controls and encoded data to a json-formatted trace file.
> The retrace function independently reads and replays the json trace file.
> The json trace file can be retraced independently from its original
> userspace environment and can be edited to inject errors to test a
> driver's error handling abilities.
> 
> The v4l2-tracer currently supports VP8, H264 and FWHT formats.

Thank you for working on this, very nice!

A more in-depth review will follow (hopefully next week), but I
did have one high-level naming question:

> 
> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
> ---
> This patch supercedes:
> [RFC,1/2] utils: add stateless tracer utility
> [RFC,2/2] utils: add stateless retracer utility
> 
> Changes since RFC:
> - combined tracer/retracer into one utility
> - added h264 and fwht formats
> - removed hard-coded link to shared library
> - added help options and man page
> - reduced json-c version requirements to 0.15
> 
> Examples:
> 
> Trace VP8 decoding:
> 
>   v4l2-tracer trace -- gst-launch-1.0 -- filesrc
>   location=test-25fps.vp8 ! parsebin ! v4l2slvp8dec !
>   videocodectestsink
> 
> Trace H264 decoding:
> 
>   v4l2-tracer trace -y -- gst-launch-1.0 -- filesrc
>   location=test-25fps.h264 ! parsebin ! v4l2slh264dec !
>   videocodectestsink
> 
> Trace FWHT decoding:
> 
>   v4l2-tracer trace -- v4l2-ctl -d9 --stream-mmap
>   --stream-out-mmap --stream-from-hdr test-25fps.fwht
>   --stream-to out.yuv
> 
> Retrace:
>   v4l2-tracer retrace 79568_trace.json
> 
>  configure.ac                         |   12 +
>  utils/Makefile.am                    |    5 +
>  utils/common/v4l2-info.cpp           |    7 +-
>  utils/common/v4l2-info.h             |    8 +
>  utils/v4l2-tracer/.gitignore         |   12 +
>  utils/v4l2-tracer/Makefile.am        |   23 +
>  utils/v4l2-tracer/libtracer.cpp      |  209 +++++
>  utils/v4l2-tracer/libtracer.h        |   35 +

If I understood it right, this will install a libtracer library?

In that case, the library name is much too generic, it should be renamed
to libv4l2tracer.

Regards,

	Hans

>  utils/v4l2-tracer/retrace-fwht.cpp   |   54 ++
>  utils/v4l2-tracer/retrace-fwht.h     |   11 +
>  utils/v4l2-tracer/retrace-h264.cpp   |  446 +++++++++
>  utils/v4l2-tracer/retrace-h264.h     |   16 +
>  utils/v4l2-tracer/retrace-helper.cpp |  157 ++++
>  utils/v4l2-tracer/retrace-helper.h   |   44 +
>  utils/v4l2-tracer/retrace-vp8.cpp    |  288 ++++++
>  utils/v4l2-tracer/retrace-vp8.h      |   11 +
>  utils/v4l2-tracer/retracer.cpp       | 1281 ++++++++++++++++++++++++++
>  utils/v4l2-tracer/trace-fwht.cpp     |   24 +
>  utils/v4l2-tracer/trace-fwht.h       |   11 +
>  utils/v4l2-tracer/trace-h264.cpp     |  281 ++++++
>  utils/v4l2-tracer/trace-h264.h       |   18 +
>  utils/v4l2-tracer/trace-helper.cpp   |  667 ++++++++++++++
>  utils/v4l2-tracer/trace-helper.h     |   81 ++
>  utils/v4l2-tracer/trace-info.cpp     |  460 +++++++++
>  utils/v4l2-tracer/trace-info.h       |   93 ++
>  utils/v4l2-tracer/trace-vp8.cpp      |  183 ++++
>  utils/v4l2-tracer/trace-vp8.h        |   11 +
>  utils/v4l2-tracer/trace.cpp          |  582 ++++++++++++
>  utils/v4l2-tracer/trace.h            |   17 +
>  utils/v4l2-tracer/v4l2-tracer.1.in   |  109 +++
>  utils/v4l2-tracer/v4l2-tracer.cpp    |  181 ++++
>  utils/v4l2-tracer/v4l2-tracer.h      |   39 +
>  32 files changed, 5370 insertions(+), 6 deletions(-)
>  create mode 100644 utils/v4l2-tracer/.gitignore
>  create mode 100644 utils/v4l2-tracer/Makefile.am
>  create mode 100644 utils/v4l2-tracer/libtracer.cpp
>  create mode 100644 utils/v4l2-tracer/libtracer.h
>  create mode 100644 utils/v4l2-tracer/retrace-fwht.cpp
>  create mode 100644 utils/v4l2-tracer/retrace-fwht.h
>  create mode 100644 utils/v4l2-tracer/retrace-h264.cpp
>  create mode 100644 utils/v4l2-tracer/retrace-h264.h
>  create mode 100644 utils/v4l2-tracer/retrace-helper.cpp
>  create mode 100644 utils/v4l2-tracer/retrace-helper.h
>  create mode 100644 utils/v4l2-tracer/retrace-vp8.cpp
>  create mode 100644 utils/v4l2-tracer/retrace-vp8.h
>  create mode 100644 utils/v4l2-tracer/retracer.cpp
>  create mode 100644 utils/v4l2-tracer/trace-fwht.cpp
>  create mode 100644 utils/v4l2-tracer/trace-fwht.h
>  create mode 100644 utils/v4l2-tracer/trace-h264.cpp
>  create mode 100644 utils/v4l2-tracer/trace-h264.h
>  create mode 100644 utils/v4l2-tracer/trace-helper.cpp
>  create mode 100644 utils/v4l2-tracer/trace-helper.h
>  create mode 100644 utils/v4l2-tracer/trace-info.cpp
>  create mode 100644 utils/v4l2-tracer/trace-info.h
>  create mode 100644 utils/v4l2-tracer/trace-vp8.cpp
>  create mode 100644 utils/v4l2-tracer/trace-vp8.h
>  create mode 100644 utils/v4l2-tracer/trace.cpp
>  create mode 100644 utils/v4l2-tracer/trace.h
>  create mode 100644 utils/v4l2-tracer/v4l2-tracer.1.in
>  create mode 100644 utils/v4l2-tracer/v4l2-tracer.cpp
>  create mode 100644 utils/v4l2-tracer/v4l2-tracer.h
> 


  reply	other threads:[~2022-09-22  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17  2:29 [PATCH] utils: add v4l2-tracer utility Deborah Brouwer
2022-09-22  8:20 ` Hans Verkuil [this message]
2022-09-27 11:08 ` Hans Verkuil

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=6a0b8be9-7486-3f22-1181-af61f6559f30@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=daniel.almeida@collabora.com \
    --cc=deborah.brouwer@collabora.com \
    --cc=deborahbrouwer3563@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=nfraprado@collabora.com \
    --cc=nicolas.dufresne@collabora.com \
    /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.