<div dir="ltr">Hi Laurent,<div><br></div><div>> Do you know if there's an easy way to try perfetto on a non-Chrome OS (and non-Android) device ?</div><div>I haven't tried it myself, but on the Perfetto Docs, there are instructions to capture a trace on Linux [1]. I'm not sure what kind of traces you'd get though :)</div><div><br></div><div>Do you mean that we might consider using perfetto in libcamera, not only on ChromeOS devices?</div><div><br></div><div>With a trace result (like I attached in the last message) though, we can see the visualized result on any devices with a browser, FYI.</div><div><br></div><div>[1]: <a href="https://perfetto.dev/docs/quickstart/linux-tracing">https://perfetto.dev/docs/quickstart/linux-tracing</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 20, 2022 at 4:49 PM Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@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>
On Tue, Jul 19, 2022 at 05:20:56PM +0800, Cheng-Hao Yang via libcamera-devel wrote:<br>
> Hi Kieran,<br>
> <br>
> Thanks for looking into this! I'll add more description/instructions in the<br>
> README, including adding new tracing points and how to check the tracing<br>
> result.<br>
<br>
Thank you.<br>
<br>
> In the meantime, you can try <a href="https://ui.perfetto.dev" rel="noreferrer" target="_blank">https://ui.perfetto.dev</a> with the attached<br>
> tracing result I recorded. In the "Show timeline" tab, you can see that<br>
> there are quite some traces with Category "libcamera "in CameraModuleThr 9<br>
> & CameraDeviceOps 11. Those might be helpful when we need to debug<br>
> something :)<br>
<br>
Do you know if there's an easy way to try perfetto on a non-Chrome OS<br>
(and non-Android) device ?<br>
<br>
> On Mon, Jul 18, 2022 at 7:49 PM Kieran Bingham wrote:<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>
> > ><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>
> > > 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>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div>