The function node_dump add some printing of node information.

Signed-off-by: Huichao cai <chcch...@163.com>
---
 lib/graph/graph_debug.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/graph/graph_debug.c b/lib/graph/graph_debug.c
index 9def306..37088ce 100644
--- a/lib/graph/graph_debug.c
+++ b/lib/graph/graph_debug.c
@@ -35,8 +35,17 @@
        fprintf(f, "  flags=0x%" PRIx64 "\n", n->flags);
        fprintf(f, "  addr=%p\n", n);
        fprintf(f, "  process=%p\n", n->process);
+       if (n->parent_id == RTE_NODE_ID_INVALID)
+               fprintf(f, "  parent_id=RTE_NODE_ID_INVALID\n");
+       else
+               fprintf(f, "  parent_id=%" PRIu32 "\n", n->parent_id);
+       fprintf(f, "  init=%p\n", n->init);
+       fprintf(f, "  fini=%p\n", n->fini);
+       fprintf(f, "  xstats=%p\n", n->xstats);
+       fprintf(f, "  next node addr=%p\n", STAILQ_NEXT(n, next));
+       if (STAILQ_NEXT(n, next))
+               fprintf(f, "  next node name=%s\n", STAILQ_NEXT(n, next)->name);
        fprintf(f, "  nb_edges=%d\n", n->nb_edges);
-
        for (i = 0; i < n->nb_edges; i++)
                fprintf(f, "     edge[%d] <%s>\n", i, n->next_nodes[i]);
 }
-- 
1.8.3.1

Reply via email to