[dpdk-dev] [EXT] [PATCH v2 4/4] trace: make CTF metadata prettier

Sunil Kumar Kori skori at marvell.com
Thu Oct 29 09:37:11 CET 2020


>-----Original Message-----
>From: David Marchand <david.marchand at redhat.com>
>Sent: Thursday, October 29, 2020 2:33 AM
>To: dev at dpdk.org
>Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; Sunil Kumar Kori
><skori at marvell.com>
>Subject: [EXT] [PATCH v2 4/4] trace: make CTF metadata prettier
>
>External Email
>
>----------------------------------------------------------------------
>This is simply a cosmetic change.
>
>Before:
>event {
>    id = 17;
>    name = "lib.eal.alarm.set";
>    fields := struct {
>        uint64_t us;uintptr_t cb_fn;uintptr_t cb_arg;int32_t rc;
>    };
>};
>
>After:
>event {
>    id = 17;
>    name = "lib.eal.alarm.set";
>    fields := struct {
>        uint64_t us;
>        uintptr_t cb_fn;
>        uintptr_t cb_arg;
>        int32_t rc;
>    };
>};
>
>Signed-off-by: David Marchand <david.marchand at redhat.com>
>---
> lib/librte_eal/common/eal_common_trace.c     | 2 +-
> lib/librte_eal/common/eal_common_trace_ctf.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/lib/librte_eal/common/eal_common_trace.c
>b/lib/librte_eal/common/eal_common_trace.c
>index bc031ca719..24e27387b1 100644
>--- a/lib/librte_eal/common/eal_common_trace.c
>+++ b/lib/librte_eal/common/eal_common_trace.c
>@@ -435,7 +435,7 @@ __rte_trace_point_emit_field(size_t sz, const char *in,
>const char *datatype)
> 	fixup = trace_metadata_fixup_field(in);
> 	if (fixup != NULL)
> 		in = fixup;
>-	rc = asprintf(&field, "%s%s %s;",
>+	rc = asprintf(&field, "%s        %s %s;\n",
> 		RTE_PER_LCORE(ctf_field) != NULL ?
> 			RTE_PER_LCORE(ctf_field) : "",
> 		datatype, in);
>diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c
>b/lib/librte_eal/common/eal_common_trace_ctf.c
>index 22615c4e73..33e419aac7 100644
>--- a/lib/librte_eal/common/eal_common_trace_ctf.c
>+++ b/lib/librte_eal/common/eal_common_trace_ctf.c
>@@ -232,7 +232,7 @@ meta_event_emit(char **meta, int *offset, struct
>trace_point *tp)
> 		"    id = %d;\n"
> 		"    name = \"%s\";\n"
> 		"    fields := struct {\n"
>-		"        %s\n"
>+		"%s"
> 		"    };\n"
> 		"};\n\n", trace_id_get(tp->handle), tp->name,
> 		tp->ctf_field != NULL ? tp->ctf_field : "");
>--
>2.23.0

Acked-by: Sunil Kumar Kori <skori at mavell.com>


More information about the dev mailing list