On Tue, 2008-12-16 at 08:42 +1100, Paul Mackerras wrote:
I don't think using ptrace in this case is a big issue - aside from the
fact that ptrace is crap in that you'd not be able to timec from a
debugger context :-(
The biggest objection to using ptrace was that ptrace was needed
_during_ the execution of the monitored load, thereby distorting the
load.
This case is different in that it would be used to start off the load.
Still it would be good if we could find another (elegant) way to fix
this.
Also, I'm pretty sure the regular 'time' suffers the very same issue and
counts the exec syscall as well - I saw that when I tinkered with the
execve argument code.
Furthermore, I think output of tools such as time and now timec are most
relevant when compared between runs - that is, the change in values
between runs, not the absolute values as such. At least, that's what I
usually do:
time ./foo
tinker with foo.c
time ./foo
if time2 < time1 :-)
else :-(
--