[dpdk-dev] [PATCH 3/8] trace: simplify trace point headers

Jerin Jacob jerinjacobk at gmail.com
Mon May 4 08:12:26 CEST 2020


On Mon, May 4, 2020 at 2:02 AM David Marchand <david.marchand at redhat.com> wrote:
>
> Invert the current trace point headers logic by making
> rte_trace_point_register.h include rte_trace_point.h.
>
> There is no more need for a RTE_TRACE_POINT_REGISTER_SELECT special macro
> since including rte_trace_point_register.h itself means we want to
> register trace points.
>
> The unexplained "provider" notion is removed from the documentation and
> rte_trace_point_provider.h is merged into rte_trace_point.h.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>

>
> @@ -271,13 +258,128 @@ __rte_experimental
>  int __rte_trace_point_register(rte_trace_point_t *trace, const char *name,
>         void (*register_fn)(void));
>
> -#ifdef RTE_TRACE_POINT_REGISTER_SELECT
> -#include <rte_trace_point_register.h>
> +#ifndef __DOXYGEN__
> +
> +#ifndef _RTE_TRACE_POINT_REGISTER_H_
> +#ifdef ALLOW_EXPERIMENTAL_API
> +
> +#include <rte_branch_prediction.h>
> +#include <rte_cycles.h>
> +#include <rte_per_lcore.h>
> +#include <rte_string_fns.h>
> +#include <rte_uuid.h>

I think, we can move this header file to the beginning of the file.


>
> -#ifndef __DOXYGEN__
> +#define __rte_trace_point_emit_header_generic(t) RTE_SET_USED(t)
> +#define __rte_trace_point_emit_header_fp(t) RTE_SET_USED(t)
> +#define __rte_trace_point_emit(in, type) RTE_SET_USED(in)
> +#define rte_trace_point_emit_string(in) RTE_SET_USED(in)
> +
> +#endif /* ALLOW_EXPERIMENTAL_API */
> +#endif

Please add / *_RTE_TRACE_POINT_REGISTER_H_ */ for this endif


Please fix the below checkpatch warnings.

1) WARNING:LONG_LINE: line over 80 characters
#449: FILE: lib/librte_eal/include/rte_trace_point_register.h:9:
+#error for tracepoint registration, include this file first before
<rte_trace_point.h>


2) WARNING:LONG_LINE: line over 80 characters
#237: FILE: lib/librte_eal/include/rte_trace_point.h:337:
+               (__RTE_TRACE_EVENT_HEADER_ID_SHIFT -
__RTE_TRACE_FIELD_ID_SHIFT));


With the above change,
Acked-by: Jerin Jacob <jerinj at marvell.com>


More information about the dev mailing list