[3/3] trace: make CTF metadata prettier
diff mbox series

Message ID 20201023080058.13335-4-david.marchand@redhat.com
State Superseded, archived
Delegated to: David Marchand
Headers show
Series
  • Rework CTF event description storage
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

David Marchand Oct. 23, 2020, 8 a.m. UTC
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@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(-)

Patch
diff mbox series

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 884dd0fa4b..e66a6c8c87 100644
--- a/lib/librte_eal/common/eal_common_trace_ctf.c
+++ b/lib/librte_eal/common/eal_common_trace_ctf.c
@@ -231,7 +231,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 : "");