From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11586 invoked by alias); 3 Jan 2018 19:05:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11568 invoked by uid 89); 3 Jan 2018 19:05:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*F:D*freebsd.org X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jan 2018 19:05:50 +0000 Received: from ralph.baldwin.cx (astound-66-234-202-155.ca.astound.net [66.234.202.155]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0C22E10A8BA; Wed, 3 Jan 2018 14:05:48 -0500 (EST) From: John Baldwin To: Simon Marchi Cc: gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH 0/4] Support for 'info proc' on FreeBSD cores and native Date: Wed, 03 Jan 2018 19:05:00 -0000 Message-ID: <3442618.PIMj3GPsCN@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <20171222220513.54983-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00034.txt.bz2 On Tuesday, December 26, 2017 08:53:08 PM Simon Marchi wrote: > On 2017-12-22 05:05 PM, John Baldwin wrote: > > This series adds initial support for the 'info proc' command on > > FreeBSD native processes and process cores. FreeBSD generally does > > not use the /proc filesystem, but instead exports data structures > > containing process information either via kernel system control nodes > > (for live processes), or in core dump notes. > > > > My assumption is that the format of 'info proc' is expected to be > > somewhat OS-specific though probably not gratuitously so. > > > > For 'info proc mappings' I choose to include both mapping attributes > > (such as permissions) along with the object file name. > > > > I did choose to implement versions of 'info proc stat' and 'info proc > > status' that are similar to the output on Linux for now. However, > > given that the output on FreeBSD is not tied to the output of files in > > /proc and that having both 'stat' and 'status' with overlapping > > content seems ambiguous, I do wonder if it wouldn't be better to just > > have a single command that includes one copy of the information (and > > perhaps treat 'stat' as an alias of 'status' on FreeBSD)? I also > > noticed in the document that there are older commands such as 'info > > proc id' and 'info proc time' that if implemented would contain a > > subset of the info in the 'stat' commands. I would possibly prefer to > > resurrect these commands on FreeBSD as subsets of 'stat/status'? What > > do you all think? > > > > I do eventually plan on adding a 'info proc files' that outputs a > > table of open file descriptors. > > > > For the documentation I made minimal changes to the existing > > documentation for 'info proc' to not state that it requires /proc, but > > the wording could probably use improvement. I have also not yet > > documented that FreeBSD supports 'proc stat' and 'proc status' due to > > the question above. > > Hi John, > > From reading the documentation, "info proc" seems to have been introduced > specifically to print things from /proc. I find it too bad however that > the command line interface is based so closely on the /proc interface, > since it brings all of its quirks with it (e.g. stat vs status). Also, > the important thing to the user is the information, regardless of where > it comes from. > > With your patch, it moves "info proc" a little bit from "printing /proc" > to "print things about a process", which I think is totally fine. I think > you could change the doc to put even less emphasis on the fact that the info > comes from /proc. Ok, I'll try to update the documentation a bit more towards that vein. > I'm fine with what you suggested above. To be clear, which of these suggestions are you fine with? 1) Having a merged 'info proc stat/status' for FreeBSD. 2) Resurrecting 'info proc id' and 'info proc time'. -- John Baldwin