chore(profiler): add built-in profiler default enable config (#8120)

Signed-off-by: yushuailong1 <yushuailong1@xiaomi.com>
This commit is contained in:
yushuailong
2025-04-22 22:13:28 +08:00
committed by GitHub
parent 0414c78fd0
commit 5d417605c1
4 changed files with 17 additions and 1 deletions
+4
View File
@@ -1556,6 +1556,10 @@ menu "LVGL configuration"
int "Default profiler trace buffer size in bytes"
depends on LV_USE_PROFILER_BUILTIN
default 16384
config LV_PROFILER_BUILTIN_DEFAULT_ENABLE
bool "Enable built-in profiler by default"
depends on LV_USE_PROFILER_BUILTIN
default y
config LV_PROFILER_INCLUDE
string "Header to include for the profiler"
default "lvgl/src/misc/lv_profiler_builtin.h"
+1
View File
@@ -1026,6 +1026,7 @@
#if LV_USE_PROFILER_BUILTIN
/** Default profiler trace buffer size */
#define LV_PROFILER_BUILTIN_BUF_SIZE (16 * 1024) /**< [bytes] */
#define LV_PROFILER_BUILTIN_DEFAULT_ENABLE 1
#endif
/** Header to include for profiler */
+11
View File
@@ -3247,6 +3247,17 @@
#define LV_PROFILER_BUILTIN_BUF_SIZE (16 * 1024) /**< [bytes] */
#endif
#endif
#ifndef LV_PROFILER_BUILTIN_DEFAULT_ENABLE
#ifdef LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_PROFILER_BUILTIN_DEFAULT_ENABLE
#define LV_PROFILER_BUILTIN_DEFAULT_ENABLE CONFIG_LV_PROFILER_BUILTIN_DEFAULT_ENABLE
#else
#define LV_PROFILER_BUILTIN_DEFAULT_ENABLE 0
#endif
#else
#define LV_PROFILER_BUILTIN_DEFAULT_ENABLE 1
#endif
#endif
#endif
/** Header to include for profiler */
+1 -1
View File
@@ -142,7 +142,7 @@ void lv_profiler_builtin_init(const lv_profiler_builtin_config_t * config)
profiler_ctx->config.flush_cb("#\n");
}
lv_profiler_builtin_set_enable(true);
lv_profiler_builtin_set_enable(LV_PROFILER_BUILTIN_DEFAULT_ENABLE);
LV_LOG_INFO("init OK, item_num = %d", (int)num);
}