[dpdk-dev] [PATCH 1/5] mempool: disable tracing for Windows

Andrew Rybchenko arybchenko at solarflare.com
Sun May 31 15:02:21 CEST 2020


On 5/31/20 3:41 PM, Fady Bader wrote:
> Tracing is not supported for Windows.
> Disabled all trace calls in for Windows.
> 
> Signed-off-by: Fady Bader <fady at mellanox.com>
> ---
>  lib/librte_mempool/mempool_trace_points.c |  4 ++++
>  lib/librte_mempool/rte_mempool.c          | 20 ++++++++++++++++++++
>  lib/librte_mempool/rte_mempool.h          | 22 ++++++++++++++++++++++
>  lib/librte_mempool/rte_mempool_ops.c      |  8 ++++++++
>  lib/librte_mempool/rte_mempool_trace_fp.h |  3 +++
>  5 files changed, 57 insertions(+)
> 
> diff --git a/lib/librte_mempool/mempool_trace_points.c b/lib/librte_mempool/mempool_trace_points.c
> index df4368b17..51f0d1705 100644
> --- a/lib/librte_mempool/mempool_trace_points.c
> +++ b/lib/librte_mempool/mempool_trace_points.c
> @@ -2,7 +2,9 @@
>   * Copyright(C) 2020 Marvell International Ltd.
>   */
>  
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  #include <rte_trace_point_register.h>
> +#endif

I really dislike the approach. It adds too many conditional
compilation statements which make code harder to read.

You can have dummy implementation of these functions on
Windows to avoid the conditional compilation.

...


More information about the dev mailing list