From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDkQ-0005d9-7R for qemu-devel@nongnu.org; Mon, 19 Oct 2015 12:57:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoDkL-0001B4-Cq for qemu-devel@nongnu.org; Mon, 19 Oct 2015 12:57:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDkL-0001B0-85 for qemu-devel@nongnu.org; Mon, 19 Oct 2015 12:57:17 -0400 Date: Mon, 19 Oct 2015 17:57:12 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20151019165712.GD2462@work-vm> References: <1444894224-9542-1-git-send-email-den@openvz.org> <1444894224-9542-3-git-send-email-den@openvz.org> <87oafzdmck.fsf_-_@blackfin.pond.sub.org> <87a8rfq6d6.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] What's the intended use of log.h logging? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Pavel Butsykin , QEMU Developers , Markus Armbruster , Stefan Hajnoczi , "Denis V. Lunev" , Luiz Capitulino * Peter Maydell (peter.maydell@linaro.org) wrote: > On 19 October 2015 at 15:29, Markus Armbruster wrote: > > Points I'd like to make: > > > > 1. Logging is not tracing. Logging logs events interesting for the > > user. Tracing logs code execution. It's a debugging aid. The two > > overlap to a degree, but they're not the same. > > In the case of QEMU, the event the user is often interested in > is (guest) code execution... > > > 2. The current use of log.h seems closer to tracing than to logging. > > Maybe. It gets a fair amount of use for "figure out what my > guest is doing" questions. > > > 3. I figure our tracing needs could be served by the tracing subsystem > > with a few improvements. The few things log.h can do that tracing can't > > yet do should be easy enough to add. Why have two separate subsystems > > then? > > I just feel that the logging subsystem is very simple and easy > to use. The tracing subsystem is far from easy to comprehend. > I'm apprehensive that in the name of simplification we'll end up > deleting the easy to use logging without making the tracing > as easy for end users to use. When I first looked at it, I thought the same way, but then I found the stderr mode, and it's really very easy. Dave > > 4. Logging would be useful, but I feel it shouldn't be shoehorned into > > log.h. > > The log.h code is definitely intended for our end users to run. > It's true that at the moment we log the things that are easy > to log rather than having the flexibility to log the things > end users would ideally like; but the solution to that is to > improve the logging... > > In particular, ideally the logging should allow you to debug or > instrument your guest program without having to care about QEMU's > internals particularly. LOG_UNIMP and LOG_GUEST_ERROR are moving > in that direction. > > thanks > -- PMM > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK