Skip to content

Commit 423caff

Browse files
committed
[nrf fromlist] samples: boards: nordic: coresight_stm: Benchmark only the cached code
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 <[email protected]>
1 parent 0d88c89 commit 423caff

File tree

1 file changed

+1
-0
lines changed
  • samples/boards/nordic/coresight_stm/src

1 file changed

+1
-0
lines changed

samples/boards/nordic/coresight_stm/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ LOG_MODULE_REGISTER(app);
1616
#define TEST_LOG(rpt, item) \
1717
({ \
1818
uint32_t key = irq_lock(); \
19+
__DEBRACKET item; \
1920
uint32_t t = k_cycle_get_32(); \
2021
for (uint32_t i = 0; i < rpt; i++) { \
2122
__DEBRACKET item; \

0 commit comments

Comments
 (0)