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@xxxxxxxxxxxxx> > --- > 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 >