]> Git Repo - linux.git/commit
lib: add Dhrystone benchmark test
authorGeert Uytterhoeven <[email protected]>
Thu, 8 Dec 2022 14:31:28 +0000 (15:31 +0100)
committerAndrew Morton <[email protected]>
Fri, 3 Feb 2023 06:50:01 +0000 (22:50 -0800)
commitd5528cc16893f1f64b07936b1e88aa023128debb
treee49450eeb732e194d49619f2a06bafa4a3d71fd7
parent88ad32a799ddc92eafd2ae204cb43f04ac20a05c
lib: add Dhrystone benchmark test

When working on SoC bring-up, (a full) userspace may not be available,
making it hard to benchmark the CPU performance of the system under
development.  Still, one may want to have a rough idea of the (relative)
performance of one or more CPU cores, especially when working on e.g.  the
clock driver that controls the CPU core clock(s).

Hence make the classical Dhrystone 2.1 benchmark available as a Linux
kernel test module, based on[1].

When built-in, this benchmark can be run without any userspace present.

Parallel runs (run on multiple CPU cores) are supported, just kick the
"run" file multiple times.

Note that the actual figures depend on the configuration options that
control compiler optimization (e.g.  CONFIG_CC_OPTIMIZE_FOR_SIZE vs.
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE), and on the compiler options used when
building the kernel in general.  Hence numbers may differ from those
obtained by running similar benchmarks in userspace.

[1] https://github.com/qris/dhrystone-deb.git

Signed-off-by: Geert Uytterhoeven <[email protected]>
Link: https://lkml.kernel.org/r/4d07ad990740a5f1e426ce4566fb514f60ec9bdd.1670509558.git.geert+renesas@glider.be
Signed-off-by: Geert Uytterhoeven <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Brendan Higgins <[email protected]>
Cc: David Gow <[email protected]>
[[email protected]: fix uninitialized use of ret]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andrew Morton <[email protected]>
lib/Kconfig.debug
lib/Makefile
lib/dhry.h [new file with mode: 0644]
lib/dhry_1.c [new file with mode: 0644]
lib/dhry_2.c [new file with mode: 0644]
lib/dhry_run.c [new file with mode: 0644]
This page took 0.05687 seconds and 4 git commands to generate.