lkml.org 
[lkml]   [2009]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-03-21 16:57    [W:0.101 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site