Messages in this thread | | | Date | Sat, 21 Mar 2009 16:54:42 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH v2] perfcounters: record time running and time enabled for each counter |
| |
* Andrew Morton <akpm@linux-foundation.org> wrote:
> > @@ -243,6 +259,8 @@ struct perf_counter { > > > > struct perf_counter *parent; > > struct list_head child_list; > > + atomic64_t child_time_enabled; > > + atomic64_t child_time_running; > > These read like booleans, but why are they atomic64_t's?
for inherited counters these values get collected back into a 'parent counter' in a lockless way - hence to not lose statistics on SMP they need to be atomic64_t.
> > @@ -290,6 +308,8 @@ struct perf_counter_context { > > int nr_active; > > int is_active; > > struct task_struct *task; > > + u64 time_now; > > + u64 time_lost; > > #endif > > }; > > I don't have a copy of this header file handy, but from the > snippet I see here, it doesn't look as though it is as clear and > as understadable as we can possibly make it?
i'll post the latest perfcounters tree - it's time for that anyway.
Ingo
| |