On 2020-03-23 10:24, Jerin Jacob wrote:
> On Fri, Mar 20, 2020 at 12:45 AM Mattias Rönnblom
> <mattias.ronnb...@ericsson.com> wrote:
>> On 2020-03-18 20:02, jer...@marvell.com wrote:
>>> From: Jerin Jacob <jer...@marvell.com>
>>>
>>> +
>>> +#define rte_trace_ctf_u64(in)\
>>> +     RTE_BUILD_BUG_ON(sizeof(uint64_t) != sizeof(typeof(in)));\
>>> +     __rte_trace_emit_ctf_field(sizeof(uint64_t), RTE_STR(in), "uint64_t")
>> Delegate to a generic macro, to which you pass the type and the "in"
>> parameter.
> Not delegated to have a generic patch to catch the following error in
> compile time.
>
> uint32_t val = 12;
>
> rte_trace_ctf_u64(val)

If you pass the type as I suggested, is there something preventing 
generating exactly the same code as the non-delegating macros?


#define __rte_trace_cft(in, in_type) \

     RTE_BUILD_BUG_ON(sizeof(in_type), != sizeof(typeof(in)));

     __rte_trace_emit_cft_field(sizeof(in_type), RTE_STR(in), 
RTE_STR(in_type))

#define rte_trace_cft_u64(in) \

     __rte_trace_ctf(in, uint64_t)


Reply via email to