Skip to contentSkip to conversation

dyndbg: display KiB of data memory used.

PATCH New Jim Cromie 1 participant 1 message May 25, 2021

Subsystems (2)
lore
Share & tools
lore

Jim Cromie

author maintainer
#0 lore raw

PATCH 1/1 dyndbg: display KiB of data memory used.

If booted with verbose>=1, dyndbg prints the memory usage in bytes, of builtin modules' prdebugs. KiB reads better.

no functional changes.

---
 lib/dynamic_debug.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/dynamic_debug.c +3 -3
index 3a7d1f9bcf4d..ab8fc16911ae 100644
@@ -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') {
Signature · 1 line
2.31.1