Re: [patch 2/2] lockdep: initialize lockdep debugging statistics

From: David Rientjes
Date: Thu Mar 05 2009 - 16:57:56 EST


On Thu, 5 Mar 2009, Ingo Molnar wrote:

>
> * Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > On Thu, 2009-03-05 at 02:29 -0800, David Rientjes wrote:
> > > The CONFIG_DEBUG_LOCKDEP statistics need to be initialized with
> > > ATOMIC_INIT(0) since they are of type atomic_t.
> >
> > And how does ATOMIC_INIT(0) differ from the global/static
> > storage being initialized to 0?
> >
> > All I can see this doing it moving the variables from bss to
> > data for some compilers.
>

It's actually the opposite for gcc 4.1.1, the debugging symbols are now in
bss.

> ok, i dropped it for now.
>

It shouldn't be dropped, the initialization is necessary because we can't
rely on atomic_t's implementation.
--
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/