Re: [PATCH v2 1/1] devres: Enable trace events

From: Andy Shevchenko
Date: Tue Apr 13 2021 - 08:26:06 EST


On Tue, Apr 13, 2021 at 03:00:52PM +0300, Heikki Krogerus wrote:
> On Tue, Apr 13, 2021 at 02:38:01PM +0300, Andy Shevchenko wrote:
> > In some cases the printf() mechanism is too heavy and can't be used.
> > For example, when debugging a race condition involving devres API.
> > When CONFIG_DEBUG_DEVRES is enabled I can't reproduce an issue, and
> > otherwise it's quite visible with a useful information being collected.
> >
> > Enable trace events for devres part of the driver core.

...

> > struct devres_node {
> > struct list_head entry;
> > dr_release_t release;
> > -#ifdef CONFIG_DEBUG_DEVRES
> > const char *name;
> > size_t size;
> > -#endif
>
> Those ifdefs are still required.

Oh, yes, otherwise we end up with not filled name and size (as per header
file). I'll rework in order to fill name and size always and get rid of
ifdeffery in the header file.

Thanks!

> > };

--
With Best Regards,
Andy Shevchenko