This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, Sep 20, 2011 at 12:09 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Mon, 19 Sep 2011 23:08:52 -0700 >> From: Doug Evans <dje@google.com> >> Cc: gdb-patches@sourceware.org >> >> > Actually, it would be much more useful to display time it took the >> > inferior between two points where GDB gets control. ?Are you trying to >> > approximate that missing feature, or is there some other use case >> > where wallclock time would be useful? >> >> It's not always the case that the inferior is running when wanting to >> see wallclock time. ?E.g., remote protocol operations, excessive nfs >> latency, etc. >> [For reference sake, MI already supports this feature for monitoring >> slow operations.] > > It sounds like it would be a good idea to mention these use cases in > the manual. > >> It's not possible to implement gettimeofday on windows with better >> accuracy? > > It is easy to do that with 10ms resolution, but not below that. ?Below > that, AFAIK only interval measurements are "easy" on Windows. > >> gettimeofday is pretty simple and standard, >> inventing something new has its own disadvantages. > > I disagree, but I can live with that. > >> >> +If set to a nonzero value, @value{GDBN} will display how much time it >> >> ?took to execute each command, following the command's own output. >> >> -The time is not printed for the commands that run the target, since >> >> -there's no mechanism currently to compute how much time was spend >> >> -by @value{GDBN} and how much time was spend by the program been debugged. >> >> -it's not possibly currently >> > >> > I'm not sure we should remove that remark, because what it says is >> > still true, even after your changes. >> >> The part about time not being printed for commands that run the target >> is not true. > > The CPU time still accounts for GDB only, right? ?It sounds like we > interpret this sentence differently, so perhaps it should be reworded > rather than being deleted. You'll need to tell me how you interpret it. Note that my docs do say that the time printed does not include inferior time. >> Does the part about there being no mechanism to compute how much time >> was spent by the inferior really add anything of value? > > It explains the meaning of the times we print, IMO. ?If someone saw > the need to tell that at some point, I tend to honor that. PTAL. 2011-11-03 Doug Evans <dje@google.com> * utils.c: #include "timeval-utils.h". (cmd_stats): Rename start_time to start_cpu_time. New member start_wall_time. (report_command_stats): Report wall time. (make_command_stats_cleanup): Record start wall time. doc/ * gdb.texinfo (Maintenance Commands): Update docs of "maint time".
Attachment:
gdb-111103-wallclock-time-2.patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |