Skip to content

Commit 125299e

Browse files
committed
Stabilizes timing measurement in VMs
1 parent 3a237c9 commit 125299e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/inline_asm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static ALWAYS_INLINE u64 _timer_warmup(void) {
159159
uint64_t __tsc; \
160160
/* make sure that address computation is done before _timer_start */ \
161161
_force_addr_calc(__ptr); \
162+
_timer_warmup(); \
162163
__tsc = _timer_start(); \
163164
ACTION(__ptr); \
164165
_timer_end() - __tsc; \
@@ -170,6 +171,7 @@ static ALWAYS_INLINE u64 _timer_warmup(void) {
170171
uint64_t __tsc; \
171172
/* make sure that address computation is done before _timer_start */ \
172173
_force_addr_calc(__ptr); \
174+
_timer_warmup(); \
173175
__tsc = _timer_start(); \
174176
ACTION(__ptr); \
175177
(end_tsc) = _timer_end_aux(&(end_aux)); \

0 commit comments

Comments
 (0)