Re: [PATCH 05/16] dyndbg: fix overcounting of ram used by dyndbg

From: Rasmus Villemoes
Date: Thu Nov 28 2019 - 03:21:39 EST


On 27/11/2019 18.50, Jim Cromie wrote:
> during dyndbg init, verbose logging prints its ram overhead. It
> counted strlens of struct _ddebug's 4 string members, in all callsite
> entries, which would be approximately correct if each had been
> mallocd. But they are pointers into shared .rodata; for example, all
> 10 kobject callsites have identical filename, module values.
>
> Its best not to count that memory at all, since we cannot know they
> were linked in because of CONFIG_DYNAMIC_DEBUG=y, and we want to
> report a number that reflects what ram is saved by deconfiguring it.

That, and we avoid 1000s of (mostly cache-cold) strlen() calls during boot.

Acked-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>

I'll see if I can find time to review the other patches, then I think
you need to resend with Andrew on the cc-list (added here). I think he's
the one routing lib/dynamic_debug.c patches.

Rasmus