From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26126 invoked by alias); 17 Mar 2010 18:05:05 -0000 Received: (qmail 26109 invoked by uid 22791); 17 Mar 2010 18:05:04 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Mar 2010 18:04:59 +0000 Received: (qmail 10382 invoked from network); 17 Mar 2010 18:04:58 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Mar 2010 18:04:58 -0000 Message-ID: <4BA119C4.9080307@codesourcery.com> Date: Wed, 17 Mar 2010 18:05:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Pedro Alves CC: Stan Shebs , gdb-patches@sourceware.org Subject: Re: PATCH: Circular trace buffers References: <4B9FFB2A.4080205@codesourcery.com> <201003171600.46751.pedro@codesourcery.com> <4BA1098A.6020800@codesourcery.com> <201003171719.30646.pedro@codesourcery.com> In-Reply-To: <201003171719.30646.pedro@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2010-03/txt/msg00631.txt.bz2 Pedro Alves wrote: >> I thought about that, but it seemed like one of its uses would be as a >> hasty way to keep a trace run alive; you do a tstatus, say "oh sh*t" as >> you see the buffer at 80% full before you've reached the code of >> interest, and quickly switch to circular buffer. >> > > ... oh sh*t, I forgot to disable that tracepoint! Oh darn, you can't > do that when the trace is running. Same thing, same general problem, > it seems. ...and you may recall, we've been requested to add the ability to disable tracepoints during a run. > This special casing in the circularity-ness adds > inconsistency (everything else is set at tstart time) which I > suspect will byte back. But it's fine. I'll just refuse to > address any such inconstencies myself and push the problem > back to you when it happens. :-) > If I had to guess, I'd say that the ultimate long-term model will tend toward on-the-fly change, rather than having it be a one-shot thing. It is potentially messy to implement (tracepoint definitions that only apply to a subset of trace frames? ugh), but is more consistent with GDB's overall philosophy of letting users do whatever they can think of. > >>> - all-stop/async + trace running + "set circular-trace-buffer" >>> errors out because you can't talk to the target if it >>> is running in all-stop. >>> >>> > > >> I think the user would know to interrupt the program, because there's no >> prompt to type the command at? >> > > Note: "async". Frontends are switching to use async mode by > default. "-gdb-set circular-trace-buffer on" does not work > in that case, only in non-stop mode. > Hmm, that doesn't sound good, guess I should investigate further. > >>> - E.g., what does "show circular-trace-buffer" mean when >>> debugging a tfile? "set circular-trace-buffer" changes >>> the local GDB flag, and "show circular-trace-buffer" >>> shows the according change, but, then we have no >>> way of knowing when debugging a tfile had been >>> in circular-trace-buffer mode or not when the tfile >>> was created. >>> >>> >> You would know if circularity had kicked in because tstatus on the file >> would show more frames created than were in the buffer. If it hadn't >> kicked in, then the flag's value wouldn't be of much interest, right? >> > > - this shows that "show circular-trace-buffer" is useless. > - this requires users know that fact. > - this doesn't sound user friendly. > I'm just not seeing a problem myself - it seems obvious that circularity of trace buffer only matters for future tracepoint hits, and doesn't matter for completed trace runs, trace files, etc. But I can rephrase the docs to make that clearer. Stan