Re: [EXTERNAL] [PATCH v2 3/3] trace: fix undefined behavior in register

2025-02-10 Thread David Marchand
On Mon, Feb 10, 2025 at 2:37 PM Jerin Jacob wrote: > > + > > +#define __RTE_TRACE_POINT(_mode, _tp, _args, ...) \ extern > > +rte_trace_point_t __##_tp; \ static __rte_always_inline void _tp _args > > +{ } \ static __rte_always_inline void \ _tp ## _register (void) \ { \ > > + __rte_trace_poin

RE: [EXTERNAL] [PATCH v2 3/3] trace: fix undefined behavior in register

2025-02-10 Thread Jerin Jacob
> -Original Message- > From: David Marchand > Sent: Thursday, January 30, 2025 8:29 PM > To: dev@dpdk.org > Cc: Chengwen Feng ; Kevin Laatz > ; Bruce Richardson ; > Jerin Jacob ; Sunil Kumar Kori ; Tyler > Retzlaff > Subject: [EXTERNAL] [PATCH v2 3/3] trace

Re: [EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-02-10 Thread David Marchand
On Mon, Feb 10, 2025 at 10:02 AM Sunil Kumar Kori wrote: > > Hi David, > > I tried validating series to see the trace results but babeltrace throws > error while reading metadata file and traces can’t be generated. > > Can you please have a look into this ? Ok, I see what is wrong, in the dma tr

RE: [EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-02-10 Thread Sunil Kumar Kori
: dev@dpdk.org; Chengwen Feng ; Kevin Laatz ; Bruce Richardson ; Tyler Retzlaff ; Andre Muezerie ; Thomas Monjalon ; Stephen Hemminger Subject: RE: [EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register Hi David, I will look into this at earliest and provide feedback. Thanks

RE: [EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-02-07 Thread Sunil Kumar Kori
; Stephen Hemminger Subject: [EXTERNAL] Re: [PATCH v2 3/3] trace: fix undefined behavior in register Hello Jerin, Sunil, On Thu, Jan 30, 2025 at 3: 59 PM David Marchand wrote: > > Registering a tracepoint handler was resulting so far in undefined > behavior at runtime

Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-02-07 Thread David Marchand
Hello Jerin, Sunil, On Thu, Jan 30, 2025 at 3:59 PM David Marchand wrote: > > Registering a tracepoint handler was resulting so far in undefined > behavior at runtime. > > The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler > (which expects arguments) to a void (*)(void). > At

Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-01-30 Thread David Marchand
On Thu, Jan 30, 2025 at 8:10 PM Stephen Hemminger wrote: > > On Thu, 30 Jan 2025 15:58:49 +0100 > David Marchand wrote: > > > Registering a tracepoint handler was resulting so far in undefined > > behavior at runtime. > > > > The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler

Re: [PATCH v2 3/3] trace: fix undefined behavior in register

2025-01-30 Thread Stephen Hemminger
On Thu, 30 Jan 2025 15:58:49 +0100 David Marchand wrote: > Registering a tracepoint handler was resulting so far in undefined > behavior at runtime. > > The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler > (which expects arguments) to a void (*)(void). > At runtime, calling

[PATCH v2 3/3] trace: fix undefined behavior in register

2025-01-30 Thread David Marchand
Registering a tracepoint handler was resulting so far in undefined behavior at runtime. The RTE_TRACE_POINT_REGISTER() macro was casting the tracepoint handler (which expects arguments) to a void (*)(void). At runtime, calling this handler while registering resulted in reading the current stack wi