From 423caffe4ffdc404be0b5c0d8a3a49adf95bda78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 10 Dec 2025 08:13:33 +0100 Subject: [PATCH] [nrf fromlist] samples: boards: nordic: coresight_stm: Benchmark only the cached code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add additional call before starting time measurement to ensure that all calls that are benchmarked are already cached. This change allows to get more stable results as all exectutions are from cache. Upstream PR #: 100784 Signed-off-by: Krzysztof Chruściński --- samples/boards/nordic/coresight_stm/src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/boards/nordic/coresight_stm/src/main.c b/samples/boards/nordic/coresight_stm/src/main.c index b788d4fc15d9..a92b4dbe6da6 100644 --- a/samples/boards/nordic/coresight_stm/src/main.c +++ b/samples/boards/nordic/coresight_stm/src/main.c @@ -16,6 +16,7 @@ LOG_MODULE_REGISTER(app); #define TEST_LOG(rpt, item) \ ({ \ uint32_t key = irq_lock(); \ + __DEBRACKET item; \ uint32_t t = k_cycle_get_32(); \ for (uint32_t i = 0; i < rpt; i++) { \ __DEBRACKET item; \