[dpdk-dev] [EXT] [PATCH v2 2/4] trace: remove size limit on CTF event description
David Marchand
david.marchand at redhat.com
Thu Oct 29 09:51:46 CET 2020
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.
--
David Marchand
More information about the dev
mailing list