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.
This commit is contained in:
parent
6f240e18b5
commit
963307726d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322033
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user