Re: [PATCH] MI: new timing command

Eli Zaretskii
2006-12-31T22:08:23Z

> From: Vladimir Prus <ghost@cs.msu.su>
> Date: Sun, 31 Dec 2006 19:20:48 +0300
> Cc: gdb-patches@sources.redhat.com
>
> On Sunday 31 December 2006 19:09, Mark Kettenis wrote:
>
> > > 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.
>
> And lose user/system/elapse time distinction?

You don't have to lose it. How about if we use getrusage directly if
it's available, else the libiberty replacement? That way, everybody
will be as happy as they can expect, I think.

> For me, having all those times
> on Linux is more valuable than having any time at all on Windows.

You are not the only user of GDB. There's no reason to gratuitously
confine features to the only platform that you are interested in.
Please remember that getrusage is not even portable enough on Posix
platforms.

> No because Windows is not important, but because I doubt there are
> any plantform specific MI slowdowns.

I'm sure you are wrong.