Skip to content

Commit 093c7f4

Browse files
peter-mitsisfabiobaltieri
authored andcommitted
tests: benchmark: Add case for object core stats
Updates both the app_kernel and latency_measure testcase scripts to include a scenario involving object core statistics. This can then be used to estimate the performance cost of using this feature post-execution by comparing its results to the scenario where it is not enabled. Signed-off-by: Peter Mitsis <[email protected]>
1 parent 19ac0a2 commit 093c7f4

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

tests/benchmarks/app_kernel/testcase.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,25 @@ tests:
1010
integration_platforms:
1111
- mps2_an385
1212
- qemu_x86
13+
benchmark.kernel.application.objcore.stats:
14+
integration_platforms:
15+
- mps2_an385
16+
- qemu_x86
17+
extra_configs:
18+
- CONFIG_OBJ_CORE=y
19+
- CONFIG_OBJ_CORE_STATS=y
1320
benchmark.kernel.application.user:
1421
extra_args: CONF_FILE=prj_user.conf
1522
filter: CONFIG_ARCH_HAS_USERSPACE
1623
integration_platforms:
1724
- qemu_x86
1825
- qemu_cortex_a53
26+
benchmark.kernel.application.user.objcore.stats:
27+
extra_args: CONF_FILE=prj_user.conf
28+
filter: CONFIG_ARCH_HAS_USERSPACE
29+
integration_platforms:
30+
- qemu_x86
31+
- qemu_cortex_a53
32+
extra_configs:
33+
- CONFIG_OBJ_CORE=y
34+
- CONFIG_OBJ_CORE_STATS=y

tests/benchmarks/latency_measure/testcase.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,27 @@ tests:
2121
- "PROJECT EXECUTION SUCCESSFUL"
2222

2323

24+
benchmark.kernel.latency.objcore.stats:
25+
# FIXME: no DWT and no RTC_TIMER for qemu_cortex_m0
26+
platform_exclude:
27+
- qemu_cortex_m0
28+
- m2gl025_miv
29+
filter: CONFIG_PRINTK and not CONFIG_SOC_FAMILY_STM32
30+
harness: console
31+
integration_platforms:
32+
- qemu_x86
33+
- qemu_arc_em
34+
extra_configs:
35+
- CONFIG_OBJ_CORE=y
36+
- CONFIG_OBJ_CORE_STATS=y
37+
harness_config:
38+
type: one_line
39+
record:
40+
regex: "(?P<metric>.*):(?P<cycles>.*) cycles ,(?P<nanoseconds>.*) ns"
41+
regex:
42+
- "PROJECT EXECUTION SUCCESSFUL"
43+
44+
2445
# Cortex-M has 24bit systick, so default 1 TICK per seconds
2546
# is achievable only if frequency is below 0x00FFFFFF (around 16MHz)
2647
# 20 Ticks per secondes allows a frequency up to 335544300Hz (335MHz)
@@ -53,3 +74,24 @@ tests:
5374
regex: "(?P<metric>.*):(?P<cycles>.*) cycles ,(?P<nanoseconds>.*) ns"
5475
regex:
5576
- "PROJECT EXECUTION SUCCESSFUL"
77+
78+
# Obtain the benchmark results with object core statistics enabled for
79+
# various user thread / kernel thread configurations on platforms that
80+
# support user space
81+
benchmark.user.latency.objcore.stats:
82+
filter: CONFIG_ARCH_HAS_USERSPACE
83+
timeout: 300
84+
extra_args: CONF_FILE=prj_user.conf
85+
harness: console
86+
integration_platforms:
87+
- qemu_x86
88+
- qemu_cortex_a53
89+
extra_configs:
90+
- CONFIG_OBJ_CORE=y
91+
- CONFIG_OBJ_CORE_STATS=y
92+
harness_config:
93+
type: one_line
94+
record:
95+
regex: "(?P<metric>.*):(?P<cycles>.*) cycles ,(?P<nanoseconds>.*) ns"
96+
regex:
97+
- "PROJECT EXECUTION SUCCESSFUL"

0 commit comments

Comments
 (0)