[dpdk-dev] [PATCH v7 31/32] mempool: add tracepoints

Fady Bader fady at mellanox.com
Mon May 18 11:44:53 CEST 2020


Hi,
I'm trying to build this patch on Windows and I'm getting a compilation error because the sizes of long and size_t vary on Windows (see comments down below).

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of jerinj at marvell.com
> Sent: Wednesday, April 22, 2020 10:04 PM
> To: Olivier Matz <olivier.matz at 6wind.com>; Andrew Rybchenko
> <arybchenko at solarflare.com>
> Cc: dev at dpdk.org; Thomas Monjalon <thomas at monjalon.net>;
> bruce.richardson at intel.com; david.marchand at redhat.com;
> mattias.ronnblom at ericsson.com; skori at marvell.com
> Subject: [dpdk-dev] [PATCH v7 31/32] mempool: add tracepoints
> 
> From: Sunil Kumar Kori <skori at marvell.com>
> 
> Add tracepoints at important and mandatory APIs for tracing support.
> 
> Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
> ---
>  lib/librte_mempool/Makefile                |   3 +
>  lib/librte_mempool/mempool_trace_points.c  | 108 +++++++++++++
>  lib/librte_mempool/meson.build             |   5 +-
>  lib/librte_mempool/rte_mempool.c           |  16 ++
>  lib/librte_mempool/rte_mempool.h           |  13 ++
>  lib/librte_mempool/rte_mempool_ops.c       |   7 +
>  lib/librte_mempool/rte_mempool_trace.h     | 178
> +++++++++++++++++++++
>  lib/librte_mempool/rte_mempool_trace_fp.h  | 116 ++++++++++++++
> lib/librte_mempool/rte_mempool_version.map |  26 +++
>  9 files changed, 470 insertions(+), 2 deletions(-)  create mode 100644
> lib/librte_mempool/mempool_trace_points.c
>  create mode 100644 lib/librte_mempool/rte_mempool_trace.h
>  create mode 100644 lib/librte_mempool/rte_mempool_trace_fp.h
> 
> diff --git a/lib/librte_mempool/rte_mempool_trace.h
> b/lib/librte_mempool/rte_mempool_trace.h
> new file mode 100644
> index 000000000..16b115a69
> --- /dev/null
> +++ b/lib/librte_mempool/rte_mempool_trace.h
> @@ -0,0 +1,178 @@
> +RTE_TRACE_POINT(
> +	rte_mempool_trace_populate_iova,
> +	RTE_TRACE_POINT_ARGS(struct rte_mempool *mempool, void
> *vaddr,
> +			     rte_iova_t iova, size_t len, void *free_cb,
> +			     void *opaque),
> +	rte_trace_point_emit_ptr(mempool);
> +	rte_trace_point_emit_string(mempool->name);
> +	rte_trace_point_emit_ptr(vaddr);
> +	rte_trace_point_emit_u64(iova);
> +	rte_trace_point_emit_long(len);

Long and size_t have different sizes in 64 bit Windows. Long is 4 bytes 
while size_t is 8. I'm trying to make the code compatible for both Linux 
and Windows, How do you recommend doing that ?

> +	rte_trace_point_emit_ptr(free_cb);
> +	rte_trace_point_emit_ptr(opaque);
> +)
> +

Regards,
Fady Bader


More information about the dev mailing list