Skip to content

Commit aa65842

Browse files
dcpleungnashif
authored andcommitted
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 <[email protected]>
1 parent b4c455c commit aa65842

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

subsys/debug/thread_analyzer.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ static void thread_print_cb(struct thread_analyzer_info *info)
5050

5151
#ifdef CONFIG_SCHED_THREAD_USAGE
5252
THREAD_ANALYZER_PRINT(
53-
THREAD_ANALYZER_FMT(" : Total CPU cycles used: %llu"),
54-
info->usage.total_cycles);
53+
THREAD_ANALYZER_FMT(" %-20s: Total CPU cycles used: %llu"),
54+
" ", info->usage.total_cycles);
5555

5656
#ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS
5757
THREAD_ANALYZER_PRINT(
5858
THREAD_ANALYZER_FMT(
59-
" - Current Frame: %llu; Longest Frame: %llu; Average Frame: %llu"),
60-
info->usage.current_cycles, info->usage.peak_cycles,
59+
" %-20s: Current Frame: %llu;"
60+
" Longest Frame: %llu; Average Frame: %llu"),
61+
" ", info->usage.current_cycles, info->usage.peak_cycles,
6162
info->usage.average_cycles);
6263
#endif
6364
#endif

0 commit comments

Comments
 (0)