tests: benchmarks: remove obsolete boot_time test suite
This test for boot time was sufficient when it was originally introduced, but is no longer appropriate as the code and ecosystem grew. Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
This commit is contained in:
parent
1a927b5fbf
commit
502d7bd116
5 changed files with 0 additions and 150 deletions
|
@ -1,13 +0,0 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.13.1)
|
|
||||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|
||||||
project(boot_time)
|
|
||||||
|
|
||||||
FILE(GLOB app_sources src/*.c)
|
|
||||||
target_sources(app PRIVATE ${app_sources})
|
|
||||||
|
|
||||||
target_include_directories(app PRIVATE
|
|
||||||
${ZEPHYR_BASE}/kernel/include
|
|
||||||
${ZEPHYR_BASE}/arch/${ARCH}/include
|
|
||||||
)
|
|
|
@ -1,64 +0,0 @@
|
||||||
Title: Boot Time Measurement
|
|
||||||
|
|
||||||
Description:
|
|
||||||
|
|
||||||
BootTime measures the time:
|
|
||||||
a) from system reset to kernel start (crt0.s's __start)
|
|
||||||
b) from kernel start to begin of main()
|
|
||||||
c) from kernel start to begin of first task
|
|
||||||
d) from kernel start to when kernel's main task goes immediately idle
|
|
||||||
|
|
||||||
The project can be built using one of the following three configurations:
|
|
||||||
|
|
||||||
best
|
|
||||||
-------
|
|
||||||
- Disables most features
|
|
||||||
- Provides best case boot measurement
|
|
||||||
|
|
||||||
default
|
|
||||||
-------
|
|
||||||
- Default configuration options
|
|
||||||
- Provides typical boot measurement
|
|
||||||
|
|
||||||
worst
|
|
||||||
-------
|
|
||||||
- Enables most features.
|
|
||||||
- Provides worst case boot measurement
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Building and Running Project:
|
|
||||||
|
|
||||||
This benchmark outputs to the console. It can be built and executed
|
|
||||||
on QEMU as follows:
|
|
||||||
|
|
||||||
make run
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Troubleshooting:
|
|
||||||
|
|
||||||
Problems caused by out-dated project information can be addressed by
|
|
||||||
issuing one of the following commands then rebuilding the project:
|
|
||||||
|
|
||||||
make clean # discard results of previous builds
|
|
||||||
# but keep existing configuration info
|
|
||||||
or
|
|
||||||
make pristine # discard results of previous builds
|
|
||||||
# and restore pre-defined configuration info
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Sample Output:
|
|
||||||
|
|
||||||
tc_start() - Boot Time Measurement
|
|
||||||
Boot Result: Clock Frequency: 25 MHz
|
|
||||||
__start : 88410717 cycles, 3536428 us
|
|
||||||
_start->main(): 2422894 cycles, 96915 us
|
|
||||||
_start->task : 2450930 cycles, 98037 us
|
|
||||||
_start->idle : 37503993 cycles, 1500159 us
|
|
||||||
Boot Time Measurement finished
|
|
||||||
===================================================================
|
|
||||||
PASS - main.
|
|
||||||
===================================================================
|
|
||||||
PROJECT EXECUTION SUCCESSFUL
|
|
|
@ -1,7 +0,0 @@
|
||||||
CONFIG_TEST=y
|
|
||||||
CONFIG_BOOT_TIME_MEASUREMENT=y
|
|
||||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
|
||||||
CONFIG_FORCE_NO_ASSERT=y
|
|
||||||
CONFIG_TEST_HW_STACK_PROTECTION=n
|
|
||||||
# Disable HW Stack Protection (see #28664)
|
|
||||||
CONFIG_HW_STACK_PROTECTION=n
|
|
|
@ -1,59 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013-2015 Wind River Systems, Inc.
|
|
||||||
* Copyright (c) 2016 Intel Corporation.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* @brief Measure boot time
|
|
||||||
*
|
|
||||||
* Measuring the boot time
|
|
||||||
* 1. From __start to main()
|
|
||||||
* 2. From __start to task
|
|
||||||
* 3. From __start to idle
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <zephyr.h>
|
|
||||||
#include <tc_util.h>
|
|
||||||
#include <kernel_internal.h>
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
uint32_t task_time_stamp; /* timestamp at beginning of first task */
|
|
||||||
uint32_t main_us; /* begin of main timestamp in us */
|
|
||||||
uint32_t task_us; /* begin of task timestamp in us */
|
|
||||||
uint32_t idle_us; /* begin of idle timestamp in us */
|
|
||||||
|
|
||||||
task_time_stamp = k_cycle_get_32();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Go to sleep for 1 tick in order to timestamp when idle thread halts.
|
|
||||||
*/
|
|
||||||
k_sleep(K_MSEC(1));
|
|
||||||
|
|
||||||
main_us = (uint32_t)ceiling_fraction(USEC_PER_SEC *
|
|
||||||
(uint64_t)z_timestamp_main,
|
|
||||||
sys_clock_hw_cycles_per_sec());
|
|
||||||
task_us = (uint32_t)ceiling_fraction(USEC_PER_SEC *
|
|
||||||
(uint64_t)task_time_stamp,
|
|
||||||
sys_clock_hw_cycles_per_sec());
|
|
||||||
idle_us = (uint32_t)ceiling_fraction(USEC_PER_SEC *
|
|
||||||
(uint64_t)z_timestamp_idle,
|
|
||||||
sys_clock_hw_cycles_per_sec());
|
|
||||||
|
|
||||||
TC_START("Boot Time Measurement");
|
|
||||||
TC_PRINT("Boot Result: Clock Frequency: %d Hz\n",
|
|
||||||
sys_clock_hw_cycles_per_sec());
|
|
||||||
TC_PRINT("_start->main(): %u cycles, %u us\n", z_timestamp_main,
|
|
||||||
main_us);
|
|
||||||
TC_PRINT("_start->task : %u cycles, %u us\n", task_time_stamp,
|
|
||||||
task_us);
|
|
||||||
TC_PRINT("_start->idle : %u cycles, %u us\n", z_timestamp_idle,
|
|
||||||
idle_us);
|
|
||||||
TC_PRINT("Boot Time Measurement finished\n");
|
|
||||||
|
|
||||||
TC_END_RESULT(TC_PASS);
|
|
||||||
TC_END_REPORT(TC_PASS);
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
tests:
|
|
||||||
benchmark.kernel.boot_time:
|
|
||||||
arch_allow: x86 arm posix
|
|
||||||
platform_exclude: qemu_x86 qemu_x86_coverage qemu_x86_64 qemu_x86_nommu
|
|
||||||
minnowboard acrn acrn_ehl_crb
|
|
||||||
tags: benchmark
|
|
||||||
filter: CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC >= 1000000
|
|
Loading…
Add table
Add a link
Reference in a new issue