diff --git a/arch/arc/core/reset.S b/arch/arc/core/reset.S index 7905eeb886c..c6dec73db5b 100644 --- a/arch/arc/core/reset.S +++ b/arch/arc/core/reset.S @@ -54,17 +54,6 @@ SECTION_FUNC(TEXT,__start) #ifdef CONFIG_ARC_SECURE_FIRMWARE sflag r0 #endif - -#if defined(CONFIG_BOOT_TIME_MEASUREMENT) && defined(CONFIG_ARCV2_TIMER) - /* - * ARCV2 timer (timer0) is a free run timer, let it start to count - * here. - */ - mov_s r0, 0xffffffff - sr r0, [_ARC_V2_TMR0_LIMIT] - mov_s r0, 0 - sr r0, [_ARC_V2_TMR0_COUNT] -#endif /* interrupt related init */ #ifndef CONFIG_ARC_NORMAL_FIRMWARE /* IRQ_ACT and IRQ_CTRL should be initialized and set in secure mode */ diff --git a/arch/x86/core/common.S b/arch/x86/core/common.S index 7152c053414..2b2da6f4350 100644 --- a/arch/x86/core/common.S +++ b/arch/x86/core/common.S @@ -26,17 +26,6 @@ 1: #endif -#ifdef CONFIG_BOOT_TIME_MEASUREMENT - /* - * Boot time measurements use TSC as a datum; zero it. - */ - - xorl %eax, %eax - xorl %edx, %edx - movl $X86_TIME_STAMP_COUNTER_MSR, %ecx - wrmsr -#endif - #ifdef CONFIG_PIC_DISABLE /* * "Disable" legacy i8259 interrupt controllers. Note that we diff --git a/drivers/timer/arcv2_timer0.c b/drivers/timer/arcv2_timer0.c index 940f82b53b3..931691cd7d5 100644 --- a/drivers/timer/arcv2_timer0.c +++ b/drivers/timer/arcv2_timer0.c @@ -300,9 +300,6 @@ int sys_clock_driver_init(const struct device *dev) timer_int_handler, NULL, 0); timer0_limit_register_set(last_load - 1); -#ifdef CONFIG_BOOT_TIME_MEASUREMENT - cycle_count = timer0_count_register_get(); -#endif #endif timer0_count_register_set(0); timer0_control_register_set(_ARC_V2_TMR_CTRL_NH | _ARC_V2_TMR_CTRL_IE); diff --git a/kernel/idle.c b/kernel/idle.c index 0e2592c184e..67d91af06b0 100644 --- a/kernel/idle.c +++ b/kernel/idle.c @@ -14,8 +14,6 @@ #include #include -extern uint32_t z_timestamp_idle; - LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); /** @@ -68,10 +66,6 @@ void idle(void *unused1, void *unused2, void *unused3) ARG_UNUSED(unused2); ARG_UNUSED(unused3); -#ifdef CONFIG_BOOT_TIME_MEASUREMENT - z_timestamp_idle = k_cycle_get_32(); -#endif - while (true) { /* SMP systems without a working IPI can't * actual enter an idle state, because they diff --git a/kernel/include/kernel_internal.h b/kernel/include/kernel_internal.h index 0eaffbfa161..807d29c7e2b 100644 --- a/kernel/include/kernel_internal.h +++ b/kernel/include/kernel_internal.h @@ -127,11 +127,6 @@ extern void z_early_boot_rand_get(uint8_t *buf, size_t length); extern int z_stack_adjust_initialized; #endif -#ifdef CONFIG_BOOT_TIME_MEASUREMENT -extern uint32_t z_timestamp_main; /* timestamp when main task starts */ -extern uint32_t z_timestamp_idle; /* timestamp when CPU goes idle */ -#endif - extern struct k_thread z_main_thread; diff --git a/kernel/init.c b/kernel/init.c index 232a9480386..b9ab4deeefc 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -37,12 +37,6 @@ #include LOG_MODULE_REGISTER(os, CONFIG_KERNEL_LOG_LEVEL); -/* boot time measurement items */ -#ifdef CONFIG_BOOT_TIME_MEASUREMENT -uint32_t __noinit z_timestamp_main; /* timestamp when main task starts */ -uint32_t __noinit z_timestamp_idle; /* timestamp when CPU goes idle */ -#endif - /* the only struct z_kernel instance */ struct z_kernel _kernel; @@ -177,10 +171,6 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3) z_sys_init_run_level(_SYS_INIT_LEVEL_SMP); #endif -#ifdef CONFIG_BOOT_TIME_MEASUREMENT - z_timestamp_main = k_cycle_get_32(); -#endif - extern void main(void); main(); diff --git a/subsys/debug/Kconfig b/subsys/debug/Kconfig index 63be6fe2008..10062f95203 100644 --- a/subsys/debug/Kconfig +++ b/subsys/debug/Kconfig @@ -6,12 +6,6 @@ menu "System Monitoring Options" -config BOOT_TIME_MEASUREMENT - bool "Boot time measurements" - depends on ARCH_POSIX || ARM || X86 - help - This option enables the recording of timestamps during system boot. - menuconfig THREAD_ANALYZER bool "Enable Thread analyzer" select INIT_STACKS