From owner-svn-src-all@freebsd.org Thu Aug 3 22:41:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25A3EDAB163; Thu, 3 Aug 2017 22:41:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4B866EB05; Thu, 3 Aug 2017 22:41:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73MfYAk079945; Thu, 3 Aug 2017 22:41:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73MfY2o079944; Thu, 3 Aug 2017 22:41:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708032241.v73MfY2o079944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 3 Aug 2017 22:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322033 - head/usr.bin/procstat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/procstat X-SVN-Commit-Revision: 322033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 22:41:36 -0000 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); }