[libcamera-devel] [PATCH 1/4] tracepoints: request: Add private pointer to request_construct
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Dec 11 21:20:07 CET 2022
Hi Paul,
Thank you for the patch.
On Fri, Dec 09, 2022 at 05:19:34PM +0900, Paul Elder via libcamera-devel wrote:
> Since some Request tracepoints print the public pointer and some print
> the private pointer, print both pointers in the constructor tracepoint
> so that they can be used to associate with the other request
> tracepoints.
Wouldn't it be easier to standardize on printing the same pointer in all
request trace points ?
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> include/libcamera/internal/tracepoints/request.tp | 13 ++++++++++---
> src/libcamera/request.cpp | 2 +-
> 2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp
> index f1e54497..491c7705 100644
> --- a/include/libcamera/internal/tracepoints/request.tp
> +++ b/include/libcamera/internal/tracepoints/request.tp
> @@ -8,6 +8,7 @@
> #include <libcamera/internal/request.h>
>
> #include <libcamera/framebuffer.h>
> +#include <libcamera/request.h>
>
> TRACEPOINT_EVENT_CLASS(
> libcamera,
> @@ -22,12 +23,18 @@ TRACEPOINT_EVENT_CLASS(
> )
> )
>
> -TRACEPOINT_EVENT_INSTANCE(
> +TRACEPOINT_EVENT(
> libcamera,
> - request,
> request_construct,
> TP_ARGS(
> - libcamera::Request *, req
> + libcamera::Request *, req,
> + libcamera::Request::Private *, priv
> + ),
> + TP_FIELDS(
> + ctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))
> + ctf_integer_hex(uintptr_t, priv, reinterpret_cast<uintptr_t>(priv))
> + ctf_integer(uint64_t, cookie, req->cookie())
> + ctf_enum(libcamera, request_status, uint32_t, status, req->status())
> )
> )
>
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index 949c556f..b9fb17d6 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -356,7 +356,7 @@ Request::Request(Camera *camera, uint64_t cookie)
> */
> metadata_ = new ControlList(controls::controls);
>
> - LIBCAMERA_TRACEPOINT(request_construct, this);
> + LIBCAMERA_TRACEPOINT(request_construct, this, _d());
>
> LOG(Request, Debug) << "Created request - cookie: " << cookie_;
> }
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list