svn commit: r322033 - head/usr.bin/procstat
Mark Johnston
markj at FreeBSD.org
Thu Aug 3 22:41:36 UTC 2017
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);
}
More information about the svn-src-all
mailing list