1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 05:19:50 +04:00

Furi: count ISR time. Cli: show ISR time in top. (#3751)

* Furi: count ISR time. Cli: show ISR time in top.
* hal: interrupt: macros for interrupt accounting; split FURI_ALWAYS_STATIC_INLINE -> FURI_ALWAYS_INLINE static

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
あく
2024-07-06 11:44:25 +01:00
committed by GitHub
parent 7879876ba1
commit cf0cc4fa8d
9 changed files with 81 additions and 19 deletions

View File

@@ -399,8 +399,9 @@ static void cli_command_top(Cli* cli, FuriString* args, void* context) {
uint32_t uptime = tick / furi_kernel_get_tick_frequency();
printf(
"Threads: %zu, Uptime: %luh%lum%lus\r\n",
"Threads: %zu, ISR Time: %0.2f%%, Uptime: %luh%lum%lus\r\n",
furi_thread_list_size(thread_list),
(double)furi_thread_list_get_isr_time(thread_list),
uptime / 60 / 60,
uptime / 60 % 60,
uptime % 60);