[libcamera-devel] [PATCH v5 03/10] libcamera: request: Add log point on a completed request

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Jul 24 11:46:56 CEST 2020


Hi Naush,

On 24/07/2020 08:22, Naushir Patuck wrote:
> Add a debug log point to indicate a request has completed.
> 
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
> ---
>  src/libcamera/request.cpp | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index 6b9e0b4a..cba1715e 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -212,6 +212,9 @@ void Request::complete()
>  {
>  	ASSERT(!hasPendingBuffers());
>  	status_ = cancelled_ ? RequestCancelled : RequestComplete;
> +
> +	LOG(Request, Debug) << "Request has completed - cookie: "
> +			    << cookie_;

sorry to extend this with feature creep, but if we're reporting a
completion here, and we've just calculated the status_, should we print
the result?

Or perhaps, only print [Cancelled] if it was a cancelled ...

Would this make sense, or be helpful? (untested)

 << cancelled_ ? " [Cancelled]" : "";


We could swap out the 'has completed' for 'has been cancelled', but I
would think it might be useful to be easy to spot cancelled requests.

>  }
>  
>  /**
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list