Re: [RFC][PATCH 2/2] perf: Add per event clockid support

2015-02-23 Thread Adrian Hunter
On 20/02/15 16:29, Peter Zijlstra wrote: > While thinking on the whole clock discussion it occured to me we have > two distinct uses of time: > > 1) the tracking of event/ctx/cgroup enabled/running/stopped times > which includes the self-monitoring support in struct > perf_event_mmap_page

Re: [RFC][PATCH 2/2] perf: Add per event clockid support

2015-02-20 Thread Peter Zijlstra
On Fri, Feb 20, 2015 at 03:28:49PM +, Pawel Moll wrote: > On Fri, 2015-02-20 at 14:29 +, Peter Zijlstra wrote: > > @@ -334,8 +335,7 @@ struct perf_event_attr { > > */ > > __u32 sample_stack_user; > > > > - /* Align to u64. */ > > - __u32 __reserved_2; > > + __u32 cloc

Re: [RFC][PATCH 2/2] perf: Add per event clockid support

2015-02-20 Thread Pawel Moll
On Fri, 2015-02-20 at 14:29 +, Peter Zijlstra wrote: > The below patch makes the distinction between these two cases by > adding perf_event_clock() which is used for the second case. It > further makes this configurable on a per-event basis, but adds a few > sanity checks such that we cannot co

[RFC][PATCH 2/2] perf: Add per event clockid support

2015-02-20 Thread Peter Zijlstra
While thinking on the whole clock discussion it occured to me we have two distinct uses of time: 1) the tracking of event/ctx/cgroup enabled/running/stopped times which includes the self-monitoring support in struct perf_event_mmap_page. 2) the actual timestamps visible in the data reco