Make it possible to dump any point of a structure by accepting & and ()
in the CTF metadata.
Update dmadev traces accordingly.

Signed-off-by: David Marchand <david.march...@redhat.com>
---
Changes since v2:
- split this change out of patch 2, as it required updating CTF metadata
  fixup,

---
 lib/dmadev/rte_dmadev_trace.h         | 8 ++------
 lib/eal/common/eal_common_trace_ctf.c | 3 +++
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/dmadev/rte_dmadev_trace.h b/lib/dmadev/rte_dmadev_trace.h
index be089c065c..c5e4babe15 100644
--- a/lib/dmadev/rte_dmadev_trace.h
+++ b/lib/dmadev/rte_dmadev_trace.h
@@ -86,18 +86,14 @@ RTE_TRACE_POINT(
        int src_port_type = conf->src_port.port_type;
        int dst_port_type = conf->dst_port.port_type;
        int direction = conf->direction;
-       uint64_t src_pcie_cfg;
-       uint64_t dst_pcie_cfg;
        rte_trace_point_emit_i16(dev_id);
        rte_trace_point_emit_u16(vchan);
        rte_trace_point_emit_int(direction);
        rte_trace_point_emit_u16(conf->nb_desc);
        rte_trace_point_emit_int(src_port_type);
-       memcpy(&src_pcie_cfg, &conf->src_port.pcie, sizeof(uint64_t));
-       rte_trace_point_emit_u64(src_pcie_cfg);
-       memcpy(&dst_pcie_cfg, &conf->dst_port.pcie, sizeof(uint64_t));
+       rte_trace_point_emit_blob(&conf->src_port.pcie, sizeof(uint64_t));
        rte_trace_point_emit_int(dst_port_type);
-       rte_trace_point_emit_u64(dst_pcie_cfg);
+       rte_trace_point_emit_blob(&conf->dst_port.pcie, sizeof(uint64_t));
        rte_trace_point_emit_ptr(conf->auto_free.m2d.pool);
        rte_trace_point_emit_int(ret);
 )
diff --git a/lib/eal/common/eal_common_trace_ctf.c 
b/lib/eal/common/eal_common_trace_ctf.c
index 6bc8bb9036..d9b307e076 100644
--- a/lib/eal/common/eal_common_trace_ctf.c
+++ b/lib/eal/common/eal_common_trace_ctf.c
@@ -378,6 +378,9 @@ char *trace_metadata_fixup_field(const char *field)
                "->",
                "*",
                " ",
+               "&",
+               "(",
+               ")",
        };
        const char *ctf_reserved_words[] = {
                "align",
-- 
2.48.1

Reply via email to