From 2fb57a0d05f2b8893e492712fe8aa3f287a2fd3b Mon Sep 17 00:00:00 2001 From: rlibby Date: Thu, 15 Jun 2017 04:49:12 +0000 Subject: [PATCH] ddb show socket debugging Display the mbuf/cluster count for a sockbuf and fix a couple whitespace issues in the output. Reviewed by: jhb, markj (both previous version) Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11062 --- sys/kern/uipc_debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_debug.c b/sys/kern/uipc_debug.c index d3b256e3feba..96c4bbe4c272 100644 --- a/sys/kern/uipc_debug.c +++ b/sys/kern/uipc_debug.c @@ -333,8 +333,6 @@ db_print_protosw(struct protosw *pr, const char *prname, int indent) db_printf("pr_fasttimo: %p ", pr->pr_fasttimo); db_printf("pr_slowtimo: %p ", pr->pr_slowtimo); db_printf("pr_drain: %p\n", pr->pr_drain); - - db_print_indent(indent); } static void @@ -408,6 +406,8 @@ db_print_sockbuf(struct sockbuf *sb, const char *sockbufname, int indent) db_printf("sb_mbmax: %u\n", sb->sb_mbmax); db_print_indent(indent); + db_printf("sb_mcnt: %u ", sb->sb_mcnt); + db_printf("sb_ccnt: %u ", sb->sb_ccnt); db_printf("sb_ctl: %u ", sb->sb_ctl); db_printf("sb_lowat: %d ", sb->sb_lowat); db_printf("sb_timeo: %jd\n", sb->sb_timeo); @@ -448,7 +448,6 @@ db_print_socket(struct socket *so, const char *socketname, int indent) db_printf(")\n"); db_print_indent(indent); - db_printf(") "); db_printf("so_pcb: %p ", so->so_pcb); db_printf("so_proto: %p\n", so->so_proto); @@ -466,6 +465,7 @@ db_print_socket(struct socket *so, const char *socketname, int indent) } else { db_printf("so_qstate: 0x%x (", so->so_qstate); db_print_soqstate(so->so_qstate); + db_printf(") "); db_printf("so_listen: %p ", so->so_listen); /* so_list skipped */ db_printf("so_timeo: %d ", so->so_timeo); @@ -473,7 +473,7 @@ db_print_socket(struct socket *so, const char *socketname, int indent) db_print_indent(indent); db_printf("so_sigio: %p ", so->so_sigio); - db_printf("so_oobmark: %lu ", so->so_oobmark); + db_printf("so_oobmark: %lu\n", so->so_oobmark); db_print_sockbuf(&so->so_rcv, "so_rcv", indent); db_print_sockbuf(&so->so_snd, "so_snd", indent);