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-boun...@dpdk.org> On Behalf Of jer...@marvell.com > Sent: Wednesday, April 22, 2020 10:04 PM > To: Olivier Matz <olivier.m...@6wind.com>; Andrew Rybchenko > <arybche...@solarflare.com> > Cc: dev@dpdk.org; Thomas Monjalon <tho...@monjalon.net>; > bruce.richard...@intel.com; david.march...@redhat.com; > mattias.ronnb...@ericsson.com; sk...@marvell.com > Subject: [dpdk-dev] [PATCH v7 31/32] mempool: add tracepoints > > From: Sunil Kumar Kori <sk...@marvell.com> > > Add tracepoints at important and mandatory APIs for tracing support. > > Signed-off-by: Sunil Kumar Kori <sk...@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