utils: add v4l2-tracer utility
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 3 repliesIn review
- v31 patch 0 repliesSuperseded
- v21 patch 3 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 2 replies | Superseded |
Changes in v4 from the cover letter
- fix clang-tidy warnings
- fix memory leaks in auto-generated code
- strings: check for nullptr before assignment
- remove unnecessary checks for nullptr before free()
- polling: check return value
- dynamic arrays: check memory allocation
- put format-specific info (h264) into a union
- add comment to the top of auto-generated files
- replace array with std::vector for media topology
- move debug/verbose options to helper functions
- fix auto-gen script to include a few extra controls
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | utils: add v4l2-tracer utilityREADME configure.ac utils/ +14 more | +5161 | 0 replies | |
| 2/2 | v4l2-tracer: add support for most basic controlsutils/ utils/ | +28 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Daniel Almeida |
|---|---|
| Series | R-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/2] utils: add v4l2-tracer utility
Hi all - thank you very much for your reviews.
This is a patch series now to add Hans' patch
for tracing basic controls.
Changes since v3:
- fix clang-tidy warnings
- fix memory leaks in auto-generated code
- strings: check for nullptr before assignment
- remove unnecessary checks for nullptr before free()
- polling: check return value
- dynamic arrays: check memory allocation
- put format-specific info (h264) into a union
- add comment to the top of auto-generated files
- replace array with std::vector for media topology
- move debug/verbose options to helper functions
- fix auto-gen script to include a few extra controls
Changes since v2:
- remove duplication in entries for numbers/strings
- use media topology to find retrace devices
- add specific ioctls to trace
- in help msg change 'data' -> 'video frame data'
- trace mem_array with space after every byte
- add to trace files package version, SHA, date
- retracer also generates a JSON retrace file
- default trace format is "pretty"
- add a "compact" format option
- consolidate options for tracer/retracer
- remove mutex locks as unnecessary
- add more autogenerated functions
- add 'clean' command to remove fd/addresses
Changes since v1:
- auto-generate code from uAPI headers
- generated code adds some ability to trace
VP9/HEVC which compiles but still needs work
- generated code adds full support for MPEG2
- fix multiplanar decoding for vicodec
- change library name to libv4l2tracer
- update README
- expand help to show options
- remove extraneous files from gitignore
Example:
Trace an application decoding VP8:
v4l2-tracer trace gst-launch-1.0 -- filesrc
location=test-25fps.vp8 ! parsebin !
v4l2slvp8dec ! videocodectestsink
Or trace an application decoding FWHT:
v4l2-tracer trace v4l2-ctl -d3 --stream-mmap
--stream-out-mmap --stream-from-hdr
test-25fps.fwht --stream-to out.yuv
A trace file is generated: 71827_trace.json
Retrace the trace file:
v4l2-tracer retrace 71827_trace.json
Specify nodes if using a different driver:
v4l2-tracer -d0 -m0 retrace 71827_trace.json
A retrace file is generated: 71827_trace_retrace.json
Remove irrelevant differences (optional)
e.g. file descriptors and addresses:
v4l2-tracer clean 71827_trace.json
v4l2-tracer clean 71827_trace_retrace.json
Clean files are generated:
clean_71827_trace.json
clean_71827_trace_retrace.json
Use an application to compare the files:
kdiff3 clean_71827_trace.json clean_71827_trace_retrace.json
Deborah Brouwer (1):
utils: add v4l2-tracer utility
Hans Verkuil (1):
v4l2-tracer: add support for most basic controls
README | 8 + configure.ac | 12 + utils/Makefile.am | 5 + utils/v4l2-tracer/.gitignore | 7 + utils/v4l2-tracer/Makefile.am | 36 + utils/v4l2-tracer/libv4l2tracer.cpp | 303 +++++ utils/v4l2-tracer/retrace-helper.cpp | 262 +++++ utils/v4l2-tracer/retrace.cpp | 1373 ++++++++++++++++++++++ utils/v4l2-tracer/retrace.h | 43 + utils/v4l2-tracer/trace-helper.cpp | 500 ++++++++ utils/v4l2-tracer/trace.cpp | 603 ++++++++++ utils/v4l2-tracer/trace.h | 75 ++ utils/v4l2-tracer/v4l2-tracer-common.cpp | 476 ++++++++ utils/v4l2-tracer/v4l2-tracer-common.h | 79 ++ utils/v4l2-tracer/v4l2-tracer-gen.pl | 879 ++++++++++++++ utils/v4l2-tracer/v4l2-tracer.1.in | 111 ++ utils/v4l2-tracer/v4l2-tracer.cpp | 415 +++++++ 17 files changed, 5187 insertions(+) create mode 100644 utils/v4l2-tracer/.gitignore create mode 100644 utils/v4l2-tracer/Makefile.am create mode 100644 utils/v4l2-tracer/libv4l2tracer.cpp create mode 100644 utils/v4l2-tracer/retrace-helper.cpp create mode 100644 utils/v4l2-tracer/retrace.cpp create mode 100644 utils/v4l2-tracer/retrace.h create mode 100644 utils/v4l2-tracer/trace-helper.cpp create mode 100644 utils/v4l2-tracer/trace.cpp create mode 100644 utils/v4l2-tracer/trace.h create mode 100644 utils/v4l2-tracer/v4l2-tracer-common.cpp create mode 100644 utils/v4l2-tracer/v4l2-tracer-common.h create mode 100755 utils/v4l2-tracer/v4l2-tracer-gen.pl create mode 100644 utils/v4l2-tracer/v4l2-tracer.1.in create mode 100644 utils/v4l2-tracer/v4l2-tracer.cpp
Signature · 1 line
2.38.0