Re: [RFC] perf: need to expose sched_clock to correlate user sampleswith kernel samples

From: John Stultz
Date: Mon Apr 08 2013 - 15:06:05 EST


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/