Extends the msgq benchmark test to obtain data for larger message
queues (messages of size 192 bytes). This allows for a better
indication of what the impact of data size is on message queue
performance.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add user thread support to message queue, semaphore, mutex and
pipe tests. Mailbox and memory map tests are restricted from
executing from user threads.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds two custom syscalls. The first allows a user thread to
change its priority to a higher priority level. The second
is used to obtain a timestamp from a user thread.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds macros for placing variables into bench_mem_partition.
This partition will be used to place global data in the test
that will need to be accessed from user threads.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Use dynamic threads instead of statically defined threads. This will
make it easier to add support for user threads to this test.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Eliminates the loop surrounding the execution of the benchmark
components as it was not doing anything.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds userspace configuration to testcase.yaml.
Updates the README.rst with output from runs on a frdm_k64f board
as not only have the descriptions changed, but there is now
additional output for userspace configurations.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Many architectures and platforms can not directly read a timestamp
from userspace as the relevant MMIO registers are inaccessible.
This necessitates that the timestamp be obtained by a system call.
The additional overhead from these system calls can be taken into
account and the recorded times adjusted depending upon whether
the test occurred entirely within kernel space, entirely within
user space, or a mix between the two.
It is worth noting that when the test requires a mix of both user
and kernel space threads, the overhead is estimated as the mean
average of purely kernel threads and purely user threads overhead
times. This might not be technically correct, but it ought to
provide a reasonable enough approximation.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates the interrupt to thread benchmark tests to address
a number of items.
1. Updates descriptions to correctly indicate that it is not
interrupt latency being measured, but the time to leave
the interrupt and return to a thread.
2. Repeats the test numerous times instead of just once to
get an average.
3. Overhead from obtaining timestamps is now accounted for.
4. Adds support for returning to a user thread.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates both the preemptive and cooperative thread context switch
benchmark tests so that not only will they share the same
infrastructure, but they can both get the context switch times
when switching from ...
1. Kernel thread to kernel thread
2. Kernel thread to user thread
3. User thread to kernel thread
4. User thread to user thread
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF where needed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add a filter by (arm) architecture, as the filter as it is faster
than filtering by kconfig.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These samples & tests cannot be run in this architecture
as it does not support userspace.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This updates the sys_kernel benchmark project to replace references to
the defunct TICKS_NONE symbol with K_NO_WAIT. It also removes the
outdated build instructions from the README.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.
Rename it to random.h and get consistently with other
subsystems.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Use CMSIS-DSP from its new realm. This also changes change how you
initialize FFT tables as well to use arm_cfft_init_64_f32 if you
know the FFT size in advance rather than the generic initialization
arm_cfft_init_f32.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This header does not expose any public APIs, so move it under
kernel/include and change files including it.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.
The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);
has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);
The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.
All in-tree uses of the function have been adapted.
Fixes#61888.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).
To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.
All files including CMSIS have been updated.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Instead of sending output strings to stdout via fputs(), just
print them using printk(). This allows the output to be detected
by twister.
Fixes#60676
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Enhances the reporting of the benchmark latency failures in the
following ways:
1. The failing test is now clearly identified
2. Failures follow the general reporting pattern
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Reduces the stack usage. Also separates the formatting of both the
cycle and nsec printing by pre-printing them to string.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Changes the names of parameters to the PRINT_STATS() and
PRINT_STATS_AVG() macros to be something more meaningful.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not run benchmarks on some special qemu platforms. Those were
previously ignored, but due to tag changes, they started running again.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
All those benchmarks are kernel related, so add the kernel tag to avoid
building them when non kernel changes are being submitted.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit marks testcases that require working Power Managament with
the appropriate `pm` tag to allow proper testcase filtering in the board
YAML file.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
LLVM doesn't support SSE + 387 math. As such if SSE is enabled we
have to utilize SSE floating point. To utilize 387 math, SSE has
to be disabled.
Update the floating point related tests to introduce 387 only variants
that will build on both GCC & LLVM based tools. Than we exclude llvm
based (llvm, oneApi) toolchains from the CONFIG_X86_SSE_FP_MATH=n and
CONFIG_X86_SSE=y test variants.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
Can't find a good reason why we are excluding architectures in those
benchmarks. This should be runnable on all.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use namespacing with extra_configs in some tests and remove duplicated
scenarios the were made arch or platform specifc.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix all line-length errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(line-length)'
Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix all comments-indentation errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(comments-indentation)'
This checks that the comment is aligned with the content.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Zephyr already has a scheduling benchmark in tests/benchmarks/sched,
but it only uses kernel threads.
We add an userspace version of it, to exercise memory domains.
Signed-off-by: Henri Xavier <datacomos@huawei.com>
For tests that set CONFIG_MP_NUM_CPUS, switch to using
CONFIG_MP_MAX_NUM_CPUS instead as we work to phase out
CONFIG_MP_NUM_CPUS.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
Instead of using "select" on certain EC configurations, which is
considered unsafe for various reasons, use a "depends on" and rely on
the user to set a proper configuration in the config file.
Update the respective project configurations to comply with the new
configuration scheme.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>