Messages in this thread | | | Subject | Re: [patch] Performance Counters for Linux, v4 | From | Peter Zijlstra <> | Date | Tue, 16 Dec 2008 15:42:59 +0100 |
| |
On Tue, 2008-12-16 at 08:42 +1100, Paul Mackerras wrote: > the execvp would be hard to get rid of without using ptrace() - and > the use of ptrace was one of the things that Ingo et al. objected to > in perfmon3.
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 :-(
| |