From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7996 invoked by alias); 31 Dec 2006 15:15:35 -0000 Received: (qmail 7982 invoked by uid 22791); 31 Dec 2006 15:15:34 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 31 Dec 2006 15:15:30 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H12PH-0004Qw-7C; Sun, 31 Dec 2006 10:15:27 -0500 Date: Sun, 31 Dec 2006 15:15:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [PATCH] MI: new timing command Message-ID: <20061231151527.GC16449@nevyn.them.org> Mail-Followup-To: Nick Roberts , Eli Zaretskii , gdb-patches@sourceware.org References: <17814.10139.269708.848818@kahikatea.snap.net.nz> <17814.58031.865155.682869@kahikatea.snap.net.nz> <20061231042547.GA3236@nevyn.them.org> <17815.18190.987950.612053@kahikatea.snap.net.nz> <20061231054946.GA4873@nevyn.them.org> <17815.27092.497145.908734@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17815.27092.497145.908734@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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: 2006-12/txt/msg00406.txt.bz2 On Sun, Dec 31, 2006 at 08:42:12PM +1300, Nick Roberts wrote: > Daniel Jacobowitz writes: > > In that case you can copy the necessary guards from that file. > > However, it does more than just getrusage - it also supports > > platforms with times() but without getrusage, which IIRC includes > > Windows, so it might be better to use it. > > But as a last resort it returns elapsed time which would be wrong. You keep saying this but I don't see why. Why is it wrong? On every platform where we can do it, we'll print usage; on platforms where we can't do it, the odds are pretty good that the OS isn't aggressively scheduling other tasks in while we're running, so wall time is pretty close to right. > > I was wondering if we should make this a normal GDB setting, and use5C > > "-gdb-set mi profiling on" to enable it. There's already a maint > > setting to do the same thing for the CLI. > > The command "maint set profiling on" is relevant for both CLI and MI, > whereas -enable-timings only works in MI. I wasn't talking about "maint set profiling on", but about "maint time 1". That doesn't currently work in MI, but it could be made to work and moved under the normal "set" hierarchy. Then we could use the same setting for both CLI and MI. In that case you wouldn't have to invent a new command that reimplements the "set" behavior; it could just be a standard auto_boolean. -- Daniel Jacobowitz CodeSourcery