On 11/4/13, 10:26 AM, Harald Servat wrote:
On 31/10/13 19:22, David Ahern wrote:
On 10/31/13, 11:23 AM, Harald Servat wrote:
Which is the relation between perf_clock() (or local_clock()) and
clock_gettime (CLOCK_MONOTONIC, ). Are they the same? If not, is there a
way to correlate them? Or alternatively, is it possible to call
local_clock() from the userland?

We still do not have a means of correlating perf_clock to time-of-day,
monotonic or any other clock source. Still trying.

Pawell Moll has a couple of patches posted -- one uses an ioctl to get
perf_clock timestamps the other makes perf_clock accessible through
clock_gettime. See attached.


Coming back to this....

Here is a module version of the posix clock approach:
 https://github.com/dsahern/linux/blob/perf-full-monty/README.ahern

As far as I can tell it works for 2.6.38 and forward and there should not be a conflict with the CLOCK_PERF id of 12. No need to patch and build your kernel, just build the module, load and go.

That branch also has time-of-day hooks for record, report, script and sched.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to