mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-24 00:07:03 +08:00
chore(profiler): add built-in profiler default enable config (#8120)
Signed-off-by: yushuailong1 <yushuailong1@xiaomi.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user