Date: Thu, 3 Aug 2017 22:41:34 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322033 - head/usr.bin/procstat Message-ID: <201708032241.v73MfY2o079944@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Aug 3 22:41:34 2017 New Revision: 322033 URL: https://svnweb.freebsd.org/changeset/base/322033 Log: Fix procstat --libxo -L. - Use the title role for column headers. - Fix a typo in a field name (lpwid -> lwpid). - Place the fields of different threads in separate containers. Modified: head/usr.bin/procstat/procstat_ptlwpinfo.c Modified: head/usr.bin/procstat/procstat_ptlwpinfo.c ============================================================================== --- head/usr.bin/procstat/procstat_ptlwpinfo.c Thu Aug 3 22:28:30 2017 (r322032) +++ head/usr.bin/procstat/procstat_ptlwpinfo.c Thu Aug 3 22:41:34 2017 (r322033) @@ -46,13 +46,15 @@ procstat_ptlwpinfo(struct procstat *prstat) return; if (!hflag) - xo_emit("{:/%6s %7s %5s %5s %5s %6s %5s} {[:/%d}{:/%s}{]:}" - " {:/%s}\n", + xo_emit( + "{T:/%6s %7s %5s %5s %5s %6s %5s} {[:/%d}{T:/%s}{]:} {T:/%s}\n", "LWPID", "EVENT", "SIGNO", "CODE", "ERRNO", "PID", "UID", 2 * sizeof(void *) + 2, "ADDR", "TDNAME"); + xo_open_container("threads"); for (i = 0; i < count; i++) { - xo_emit("{:lpwid/%6d} ", pl[i].pl_lwpid); + xo_open_container("thread"); + xo_emit("{:lwpid/%6d} ", pl[i].pl_lwpid); switch (pl[i].pl_event) { case PL_EVENT_NONE: xo_emit("{eq:event/none}{d:event/%7s} ", "none"); @@ -85,7 +87,9 @@ procstat_ptlwpinfo(struct procstat *prstat) 2 * sizeof(void *) + 2, "-"); } xo_emit("{:tdname/%s}\n", pl[i].pl_tdname); + xo_close_container("thread"); } + xo_close_container("threads"); procstat_freeptlwpinfo(prstat, pl); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708032241.v73MfY2o079944>