[dpdk-dev] [EXT] [PATCH v2 2/4] trace: remove size limit on CTF event description
Sunil Kumar Kori
skori at marvell.com
Thu Oct 29 10:36:35 CET 2020
>-----Original Message-----
>From: David Marchand <david.marchand at redhat.com>
>Sent: Thursday, October 29, 2020 2:22 PM
>To: Sunil Kumar Kori <skori at marvell.com>
>Cc: dev at dpdk.org; Jerin Jacob Kollanukkaran <jerinj at marvell.com>
>Subject: Re: [EXT] [PATCH v2 2/4] trace: remove size limit on CTF event
>description
>
>On Thu, Oct 29, 2020 at 9:41 AM Sunil Kumar Kori <skori at marvell.com>
>wrote:
>> >@@ -505,15 +504,11 @@ __rte_trace_point_register(rte_trace_point_t
>> >*handle, const char *name,
>> > goto free;
>> > }
>> >
>> >- /* Copy the field data for future use */
>> >- if (rte_strscpy(tp->ctf_field, field, TRACE_CTF_FIELD_SIZE) < 0) {
>> >- trace_err("CTF field size is too long");
>> >- rte_errno = E2BIG;
>> >- goto free;
>> >- }
>> >-
>> >- /* Clear field memory for the next event */
>> >- memset(field, 0, TRACE_CTF_FIELD_SIZE);
>> >+ /* Copy the accumulated fields description and clear it for the next
>> >+ * trace point.
>> >+ */
>> >+ tp->ctf_field = RTE_PER_LCORE(ctf_field);
>> >+ RTE_PER_LCORE(ctf_field) = NULL;
>>
>> Although patch looks okay but I have one that how "tp->ctf_field" is
>> populated because during registration time RTE_PER_LCORE(ctf_field) will
>be NULL. So "tp->ctf_field" will always be NULL.
>
>Sorry, I don't understand your comment.
>RTE_PER_LCORE(ctf_field) is filled at __rte_trace_point_emit_field.
Yes but I am not able to understand that how tp->ctf_field will be populated with latest memory
because RTE_PER_LCORE(ctf_field) is being free and re-allocated at runtime.
>
>
>--
>David Marchand
More information about the dev
mailing list