Messages in this thread | | | Date | Fri, 23 Jan 2015 11:05:37 -0700 | From | David Ahern <> | Subject | Re: [PATCH v4 3/3] perf: Sample additional clock value |
| |
On 1/23/15 10:06 AM, Pawel Moll wrote: > As far as I understand (John?) POSIX timers can be used on any clockid? > So it would be possible to obtain a dynamic clock id, for example for my > exotic trace hardware (by any means necessary, like opening a char > device) and create a timer firing every 1 ms (in the trace time domain). > Than this event would be somehow associated with a perf session (for > example, by passing the timerid via perf's ioctl) and then, every when > timer fires, a perf record (something like PERF_RECORD_TIMER?) > containing the timer/clock's value*and* the normal perf timestamp, > would be injected into the circular buffer.
Like this: https://lkml.org/lkml/2011/2/27/158 ? note the date -- 4 years ago. This is has been dragging on for a long time.
A few problems with that approach: 1. I would like to see a sample generated immediately to get the perf_clock -> timeofday correlation immediately rather than have to wait N (milli)seconds and have perf scan forward through an M-(giga)byte file looking for the one sample that gives the correlation.
I tried to address that problem with an ioctl to force a sample into the stream: https://lkml.org/lkml/2011/2/27/159 it did not go over very well.
2. there is a risk that the realtime samples dominate a stream.
Another issue that has been raised is updates to xtime by ntp / user. I have suggested tracepoints to catch those: https://lkml.org/lkml/2011/6/7/636 I don't believe there were ever any comments on the tracepoints.
David
| |