diff mbox series

[v2,1/9] trace: fix mode for new trace point

Message ID 20221004094418.196544-2-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series Trace subsystem fixes | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Oct. 4, 2022, 9:44 a.m. UTC
If an application registers trace points later than rte_eal_init(),
changes in the trace point mode were not applied.

Fixes: 84c4fae4628f ("trace: implement operation APIs")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/common/eal_common_trace.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jerin Jacob Oct. 11, 2022, 2:16 p.m. UTC | #1
On Tue, Oct 4, 2022 at 3:14 PM David Marchand <david.marchand@redhat.com> wrote:
>
> If an application registers trace points later than rte_eal_init(),
> changes in the trace point mode were not applied.
>
> Fixes: 84c4fae4628f ("trace: implement operation APIs")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>


> ---
>  lib/eal/common/eal_common_trace.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c
> index f9b187d15f..d5dbc7d667 100644
> --- a/lib/eal/common/eal_common_trace.c
> +++ b/lib/eal/common/eal_common_trace.c
> @@ -512,6 +512,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name,
>         /* Form the trace handle */
>         *handle = sz;
>         *handle |= trace.nb_trace_points << __RTE_TRACE_FIELD_ID_SHIFT;
> +       trace_mode_set(handle, trace.mode);
>
>         trace.nb_trace_points++;
>         tp->handle = handle;
> --
> 2.37.3
>
Sunil Kumar Kori Oct. 12, 2022, 9:05 a.m. UTC | #2
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Tuesday, October 4, 2022 3:14 PM
> To: dev@dpdk.org
> Cc: skori@mavell.com; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> stable@dpdk.org; Sunil Kumar Kori <skori@marvell.com>
> Subject: [EXT] [PATCH v2 1/9] trace: fix mode for new trace point
> 
> External Email
> 
> ----------------------------------------------------------------------
> If an application registers trace points later than rte_eal_init(), changes in the
> trace point mode were not applied.
> 
> Fixes: 84c4fae4628f ("trace: implement operation APIs")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  lib/eal/common/eal_common_trace.c | 1 +
>  1 file changed, 1 insertion(+)
> 


Acked-by: Sunil Kumar Kori <skori@marvell.com>

> diff --git a/lib/eal/common/eal_common_trace.c
> b/lib/eal/common/eal_common_trace.c
> index f9b187d15f..d5dbc7d667 100644
> --- a/lib/eal/common/eal_common_trace.c
> +++ b/lib/eal/common/eal_common_trace.c
> @@ -512,6 +512,7 @@ __rte_trace_point_register(rte_trace_point_t
> *handle, const char *name,
>  	/* Form the trace handle */
>  	*handle = sz;
>  	*handle |= trace.nb_trace_points << __RTE_TRACE_FIELD_ID_SHIFT;
> +	trace_mode_set(handle, trace.mode);
> 
>  	trace.nb_trace_points++;
>  	tp->handle = handle;
> --
> 2.37.3
diff mbox series

Patch

diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c
index f9b187d15f..d5dbc7d667 100644
--- a/lib/eal/common/eal_common_trace.c
+++ b/lib/eal/common/eal_common_trace.c
@@ -512,6 +512,7 @@  __rte_trace_point_register(rte_trace_point_t *handle, const char *name,
 	/* Form the trace handle */
 	*handle = sz;
 	*handle |= trace.nb_trace_points << __RTE_TRACE_FIELD_ID_SHIFT;
+	trace_mode_set(handle, trace.mode);
 
 	trace.nb_trace_points++;
 	tp->handle = handle;