From aa65842e95964f989a8d03fcfca88bcd281ce58d Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Mon, 29 Jul 2024 11:49:56 -0700 Subject: [PATCH] debug: thread_analyzer: align output The per-thread output after the first stack usage line is not aligned which makes it harder to decipher the content. So align them for easier reading. Signed-off-by: Daniel Leung --- subsys/debug/thread_analyzer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/subsys/debug/thread_analyzer.c b/subsys/debug/thread_analyzer.c index 9b161cbc52b..5c8b2c65b55 100644 --- a/subsys/debug/thread_analyzer.c +++ b/subsys/debug/thread_analyzer.c @@ -50,14 +50,15 @@ static void thread_print_cb(struct thread_analyzer_info *info) #ifdef CONFIG_SCHED_THREAD_USAGE THREAD_ANALYZER_PRINT( - THREAD_ANALYZER_FMT(" : Total CPU cycles used: %llu"), - info->usage.total_cycles); + THREAD_ANALYZER_FMT(" %-20s: Total CPU cycles used: %llu"), + " ", info->usage.total_cycles); #ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS THREAD_ANALYZER_PRINT( THREAD_ANALYZER_FMT( - " - Current Frame: %llu; Longest Frame: %llu; Average Frame: %llu"), - info->usage.current_cycles, info->usage.peak_cycles, + " %-20s: Current Frame: %llu;" + " Longest Frame: %llu; Average Frame: %llu"), + " ", info->usage.current_cycles, info->usage.peak_cycles, info->usage.average_cycles); #endif #endif