Messages in this thread | | | Date | Mon, 08 Apr 2013 12:05:52 -0700 | From | John Stultz <> | Subject | Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples |
| |
On 04/08/2013 10:58 AM, Pawel Moll wrote: > Now, before I spend time doing all this, a question to John, Peter, > Stephane and the rest of the public - would a solution providing such > userspace interface: > > fd = sys_perf_open() > timestamp = clock_gettime((FD_TO_CLOCKID(fd), &ts) > > be acceptable to all?
So thinking this through further, I'm worried we may _not_ be able to eventually enable this to be a vdso as I had earlier hoped. Mostly because I'm not sure how the fd -> file -> clock lookup could be done in userland (any ideas?).
So this makes this approach mostly equivalent long term to the ioctl method, from a performance perspective. And makes the dynamic posix clockid somewhat less of a middle-ground compromise between the ioctl and generic constant clockid approach.
So while I'm not opposed to the sort of extention proposed above, I want to make sure introducing the new approach is worth the effort when compared with just adding an ioctl.
thanks -john
| |