<div dir="ltr">Hi Kieran,<div><br></div><div>Thanks for looking into this! I'll add more description/instructions in the README, including adding new tracing points and how to check the tracing result.</div><div><br></div><div>In the meantime, you can try <a href="https://ui.perfetto.dev">https://ui.perfetto.dev</a> with the attached tracing result I recorded. In the "Show timeline" tab, you can see that there are quite some traces with Category "libcamera "in CameraModuleThr 9 & CameraDeviceOps 11. Those might be helpful when we need to debug something :)</div><div><br></div><div>BR,</div><div>Harvey</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 18, 2022 at 7:49 PM Kieran Bingham <<a href="mailto:kieran.bingham@ideasonboard.com">kieran.bingham@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Harvey,<br>
<br>
Quoting Harvey Yang via libcamera-devel (2022-06-15 15:20:50)<br>
> Hello everyone,<br>
> <br>
> This is the first draft of the patch(es) that uses tracing with perfetto<br>
> instead of lttng when libcamera is used in ChromeOS, which already uses<br>
> perfetto to collect traces in most of the applications/services.<br>
> <br>
> Please take a look and see if it's the right direction to go. Mostly I<br>
> copied and pasted the simple producer in chromiumos (also written by<br>
> me :) ):<br>
> <a href="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/perfetto_simple_producer" rel="noreferrer" target="_blank">https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/perfetto_simple_producer</a><br>
> <br>
<br>
This looks interesting, and the perfetto UI viewer tool [0] looks good too.<br>
<br>
[0] <a href="https://ui.perfetto.dev/" rel="noreferrer" target="_blank">https://ui.perfetto.dev/</a><br>
<br>
Could you summarise some instructions on how to test this please?<br>
A good visualisation for libcamera internals would be great. I would<br>
love to see this able to switch between showing what each thread /<br>
component is busy processing, or have the timeline present the progress<br>
of Requests through the system.<br>
<br>
--<br>
Kieran<br>
<br>
<br>
> Thanks!<br>
> <br>
> BR,<br>
> Harvey<br>
> <br>
> Harvey Yang (1):<br>
> Use tracing with perfetto in ChromeOS<br>
> <br>
> include/libcamera/internal/<a href="http://tracepoints.h.in" rel="noreferrer" target="_blank">tracepoints.h.in</a> | 37 +++++++++--<br>
> .../internal/tracepoints/meson.build | 25 ++++---<br>
> .../internal/tracepoints/pipeline.perfetto | 10 +++<br>
> .../internal/tracepoints/request.perfetto | 30 +++++++++<br>
> meson.build | 1 +<br>
> src/android/cros/camera3_hal.cpp | 5 ++<br>
> src/android/cros/meson.build | 1 +<br>
> src/libcamera/meson.build | 18 ++++-<br>
> src/libcamera/pipeline_perfetto.cpp | 22 +++++++<br>
> src/libcamera/request_perfetto.cpp | 65 +++++++++++++++++++<br>
> src/libcamera/tracepoints.cpp | 11 ++++<br>
> 11 files changed, 209 insertions(+), 16 deletions(-)<br>
> create mode 100644 include/libcamera/internal/tracepoints/pipeline.perfetto<br>
> create mode 100644 include/libcamera/internal/tracepoints/request.perfetto<br>
> create mode 100644 src/libcamera/pipeline_perfetto.cpp<br>
> create mode 100644 src/libcamera/request_perfetto.cpp<br>
> <br>
> -- <br>
> 2.36.1.476.g0c4daa206d-goog<br>
><br>
</blockquote></div>