This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] MI: new timing command
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: ghost at cs dot msu dot su, gdb-patches at sources dot redhat dot com
- Date: Mon, 1 Jan 2007 17:05:01 +1300
- Subject: Re: [PATCH] MI: new timing command
- References: <17814.10139.269708.848818@kahikatea.snap.net.nz> <u8xgp2wnm.fsf@gnu.org> <17814.58031.865155.682869@kahikatea.snap.net.nz> <umz541yqg.fsf@gnu.org> <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> <20061231151527.GC16449@nevyn.them.org> <200612311524.kBVFObud010411@brahms.sibelius.xs4all.nl> <E1H12lf-0002Zf-GT@zigzag.lvk.cs.msu.su> <200612311609.kBVG9Fgh022431@brahms.sibelius.xs4all.nl>
> > >> > 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 agree completely.
> >
> > Is this important? This timing is entirely for diagnostic purposes,
> > so why try to make it work on every possible platform. We need to document
> > that -enable-timing may fail, and that's it.
>
> The point is to use get_run_time() from -liberty and never worry about
> portability again.
Let's be realistic. This isn't a command for general users of GDB, it isn't
even a command for general users of frontends to GDB. It's a command for
developers of frontends to GDB which currently means just myself and Vladimir,
and maybe a couple of others like Bob Rossi and Alain Magloire.
I'm not familiar with get_run_time but I'm sure we all know getrusage through
the time shell command. If the frontend appears to be slow I can see if that's
due to MI or other things running on my system. I'm not sure that I can do
that with get_run_time. I would like to start with getrusage and then when
there are hoards of developers rushing to develop frontends for GDB using
MI on Windows, I'll be happy to accommodate them.
--
Nick http://www.inet.net.nz/~nickrob