Re: [PATCH] perf: POSIX CLOCK_PERF to report current time value

From: Ingo Molnar
Date: Wed Dec 11 2013 - 06:25:39 EST



* David Ahern <dsahern@xxxxxxxxx> wrote:

> From: Pawel Moll <pawel.moll@xxxxxxx>
>
> To co-relate user space events with the perf events stream
> a current (as in: "what time(stamp) is it now?") time value
> must be made available.

So I'm wondering about your earlier approach posted here:

https://lkml.org/lkml/2011/6/7/636

I'd modify that patch the following way: instead of tracking each
separate reason, perhaps only track timekeeping_update().

Such a tracepoint, combined with PERF_SAMPLE_TIME, would very
accurately track external changes to GTOD (xtime).

That leaves us with tracking/correlating the regular flow of time,
which could be achieved by another tracepoint in:

kernel/time/timekeeping.c::do_timer()

So only two new tracepoints are needed AFAICS - and the tracepoints
would obviously be useful for other (debugging) purposes as well.
Would that solve the wall-clock correlation problem adequately?

Thanks,

Ingo
--
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/