dyndbg: display KiB of data memory used.
authorJim Cromie <jim.cromie@gmail.com>
Tue, 25 May 2021 03:32:40 +0000 (21:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 May 2021 12:41:57 +0000 (14:41 +0200)
If booted with verbose>=1, dyndbg prints the memory usage in bytes,
of builtin modules' prdebugs.  KiB reads better.

no functional changes.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20210525033240.35260-1-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/dynamic_debug.c

index 641767b..d3ce782 100644 (file)
@@ -1117,9 +1117,9 @@ static int __init dynamic_debug_init(void)
                goto out_err;
 
        ddebug_init_success = 1;
-       vpr_info("%d modules, %d entries and %d bytes in ddebug tables, %d bytes in __dyndbg section\n",
-                modct, entries, (int)(modct * sizeof(struct ddebug_table)),
-                (int)(entries * sizeof(struct _ddebug)));
+       vpr_info("%d prdebugs in %d modules, %d KiB in ddebug tables, %d kiB in __dyndbg section\n",
+                entries, modct, (int)((modct * sizeof(struct ddebug_table)) >> 10),
+                (int)((entries * sizeof(struct _ddebug)) >> 10));
 
        /* apply ddebug_query boot param, dont unload tables on err */
        if (ddebug_setup_string[0] != '\0') {