[libcamera-devel,v2,3/6] tracepoints: Add pipeline tracepoints for tracing IPA calls
diff mbox series

Message ID 20201028103151.34575-3-paul.elder@ideasonboard.com
State Superseded
Delegated to: Paul Elder
Headers show
Series
  • [libcamera-devel,v2,1/6] libcamera: tracing: Implement tracing infrastructure
Related show

Commit Message

Paul Elder Oct. 28, 2020, 10:31 a.m. UTC
Add a pair of tracepoints to a general pipeline tracepoints file,
libcamera:ipa_call_start and libcamera:ipa_call_finish, to trace IPA
calls. This allows us to obtain the time taken for the IPA call.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

---
New in v2
---
 .../internal/tracepoints/meson.build          |  1 +
 .../internal/tracepoints/pipeline.tp          | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 include/libcamera/internal/tracepoints/pipeline.tp

Comments

Laurent Pinchart Oct. 28, 2020, 11:56 p.m. UTC | #1
Hi Paul

Thank you for the patch.

On Wed, Oct 28, 2020 at 07:31:48PM +0900, Paul Elder wrote:
> Add a pair of tracepoints to a general pipeline tracepoints file,
> libcamera:ipa_call_start and libcamera:ipa_call_finish, to trace IPA
> calls. This allows us to obtain the time taken for the IPA call.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> 
> ---
> New in v2
> ---
>  .../internal/tracepoints/meson.build          |  1 +
>  .../internal/tracepoints/pipeline.tp          | 25 +++++++++++++++++++
>  2 files changed, 26 insertions(+)
>  create mode 100644 include/libcamera/internal/tracepoints/pipeline.tp
> 
> diff --git a/include/libcamera/internal/tracepoints/meson.build b/include/libcamera/internal/tracepoints/meson.build
> index 8410c205..a34135ce 100644
> --- a/include/libcamera/internal/tracepoints/meson.build
> +++ b/include/libcamera/internal/tracepoints/meson.build
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: CC0-1.0
>  
>  tracepoint_files = files([
> +    'pipeline.tp',
>      'request.tp',
>  ])
> diff --git a/include/libcamera/internal/tracepoints/pipeline.tp b/include/libcamera/internal/tracepoints/pipeline.tp
> new file mode 100644
> index 00000000..603f4a8c
> --- /dev/null
> +++ b/include/libcamera/internal/tracepoints/pipeline.tp
> @@ -0,0 +1,25 @@
> +TRACEPOINT_EVENT(
> +	libcamera,
> +	ipa_call_start,

I would have called this ipa_call_begin and the next one ipa_call_end,
but I'm not sure why, so feel free to ignore :-)

> +	TP_ARGS(
> +		char *, pipe,
> +		char *, func

Maybe const char * is all you need to fix the cast issue in your next
patch ?

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +	),
> +	TP_FIELDS(
> +		ctf_string(pipeline_name, pipe)
> +		ctf_string(function_name, func)
> +	)
> +)
> +
> +TRACEPOINT_EVENT(
> +	libcamera,
> +	ipa_call_finish,
> +	TP_ARGS(
> +		char *, pipe,
> +		char *, func
> +	),
> +	TP_FIELDS(
> +		ctf_string(pipeline_name, pipe)
> +		ctf_string(function_name, func)
> +	)
> +)

Patch
diff mbox series

diff --git a/include/libcamera/internal/tracepoints/meson.build b/include/libcamera/internal/tracepoints/meson.build
index 8410c205..a34135ce 100644
--- a/include/libcamera/internal/tracepoints/meson.build
+++ b/include/libcamera/internal/tracepoints/meson.build
@@ -1,5 +1,6 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
 tracepoint_files = files([
+    'pipeline.tp',
     'request.tp',
 ])
diff --git a/include/libcamera/internal/tracepoints/pipeline.tp b/include/libcamera/internal/tracepoints/pipeline.tp
new file mode 100644
index 00000000..603f4a8c
--- /dev/null
+++ b/include/libcamera/internal/tracepoints/pipeline.tp
@@ -0,0 +1,25 @@ 
+TRACEPOINT_EVENT(
+	libcamera,
+	ipa_call_start,
+	TP_ARGS(
+		char *, pipe,
+		char *, func
+	),
+	TP_FIELDS(
+		ctf_string(pipeline_name, pipe)
+		ctf_string(function_name, func)
+	)
+)
+
+TRACEPOINT_EVENT(
+	libcamera,
+	ipa_call_finish,
+	TP_ARGS(
+		char *, pipe,
+		char *, func
+	),
+	TP_FIELDS(
+		ctf_string(pipeline_name, pipe)
+		ctf_string(function_name, func)
+	)
+)