[libcamera-devel] [PATCH 0/1] Use tracing with perfetto in ChromeOS

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Jul 18 13:49:11 CEST 2022


Hi Harvey,

Quoting Harvey Yang via libcamera-devel (2022-06-15 15:20:50)
> Hello everyone,
> 
> This is the first draft of the patch(es) that uses tracing with perfetto
> instead of lttng when libcamera is used in ChromeOS, which already uses
> perfetto to collect traces in most of the applications/services.
> 
> Please take a look and see if it's the right direction to go. Mostly I
> copied and pasted the simple producer in chromiumos (also written by
> me :) ):
> https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/perfetto_simple_producer
> 

This looks interesting, and the perfetto UI viewer tool [0] looks good too.

[0] https://ui.perfetto.dev/

Could you summarise some instructions on how to test this please?
A good visualisation for libcamera internals would be great. I would
love to see this able to switch between showing what each thread /
component is busy processing, or have the timeline present the progress
of Requests through the system.

--
Kieran


> Thanks!
> 
> BR,
> Harvey
> 
> Harvey Yang (1):
>   Use tracing with perfetto in ChromeOS
> 
>  include/libcamera/internal/tracepoints.h.in   | 37 +++++++++--
>  .../internal/tracepoints/meson.build          | 25 ++++---
>  .../internal/tracepoints/pipeline.perfetto    | 10 +++
>  .../internal/tracepoints/request.perfetto     | 30 +++++++++
>  meson.build                                   |  1 +
>  src/android/cros/camera3_hal.cpp              |  5 ++
>  src/android/cros/meson.build                  |  1 +
>  src/libcamera/meson.build                     | 18 ++++-
>  src/libcamera/pipeline_perfetto.cpp           | 22 +++++++
>  src/libcamera/request_perfetto.cpp            | 65 +++++++++++++++++++
>  src/libcamera/tracepoints.cpp                 | 11 ++++
>  11 files changed, 209 insertions(+), 16 deletions(-)
>  create mode 100644 include/libcamera/internal/tracepoints/pipeline.perfetto
>  create mode 100644 include/libcamera/internal/tracepoints/request.perfetto
>  create mode 100644 src/libcamera/pipeline_perfetto.cpp
>  create mode 100644 src/libcamera/request_perfetto.cpp
> 
> -- 
> 2.36.1.476.g0c4daa206d-goog
>


More information about the libcamera-devel mailing list