trace: fix size_t field emitter
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Tue, 25 Aug 2020 23:24:08 +0000 (04:54 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 7 Oct 2020 12:40:31 +0000 (14:40 +0200)
Add size_t CTF format metadata, this is needed by CTF analyzers to
parse the emitted CTF trace.

Fixes: 262c4ee791c6 ("trace: add size_t field emitter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Sunil Kumar Kori <skori@mavell.com>
lib/librte_eal/common/eal_common_trace_ctf.c

index 302e2bb..9dc91df 100644 (file)
@@ -83,6 +83,11 @@ meta_data_type_emit(char **meta, int *offset)
                "typealias integer {size = 32; base = x;} := long;\n"
 #endif
                "typealias integer {size = 8; signed = false; encoding = ASCII; } := string_bounded_t;\n\n"
+#ifdef RTE_ARCH_64
+               "typealias integer {size = 64; base = x;} := size_t;\n"
+#else
+               "typealias integer {size = 32; base = x;} := size_t;\n"
+#endif
                "typealias floating_point {\n"
                "    exp_dig = 8;\n"
                "    mant_dig = 24;\n"