[PATCH v4] eal: add build-time option to omit trace
Jerin Jacob
jerinjacobk at gmail.com
Tue Sep 24 17:41:31 CEST 2024
On Tue, Sep 24, 2024 at 7:10 PM Morten Brørup <mb at smartsharesystems.com> wrote:
>
> Some applications want to omit the trace feature.
> Either to reduce the memory footprint, to reduce the exposed attack
> surface, or for other reasons.
>
> This patch adds an option in rte_config.h to include or omit trace in the
> build. Trace is included by default.
>
> Omitting trace works by omitting all trace points.
> For API and ABI compatibility, the trace feature itself remains.
>
> Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
> ---
> v4:
> * Added check for generic trace enabled when registering trace points, in
> RTE_INIT. (Jerin Jacob)
> * Test application uses function instead of macro to check if generic
> trace is enabled. (Jerin Jacob)
> * Performance test application uses function to check if generic trace is
> enabled.
> v3:
> * Simpler version with much fewer ifdefs. (Jerin Jacob)
> v2:
> * Added/modified macros required for building applications with trace
> omitted.
>
> +/**
> + * @internal
Since it is used in app/test. Can we remove it as internal and make
symbol as rte_trace_point_is_enabled
> + *
> + * Test if the tracepoint compile-time option is enabled.
> + *
> + * @return
> + * true if tracepoint enabled, false otherwise.
> + */
> +__rte_experimental
> +static __rte_always_inline bool
> +__rte_trace_point_generic_is_enabled(void)
Do we need to keep _generic_
Rest looks good to me.
More information about the dev
mailing list