Re: [Qemu-devel] [RFC PATCH] qemu-io-cmds: use clock_gettime for benchmarking

2019-05-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190529162438.22653-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [RFC PATCH] qemu-io-cmds: use clock_gettime for benchmarking Type: series Message-id

[Qemu-devel] [RFC PATCH] qemu-io-cmds: use clock_gettime for benchmarking

2019-05-29 Thread Alex Bennée
The previous use of gettimeofday() ran into undefined behaviour when we ended up doing a div 0 for a very short operation. This is because gettimeofday only works at the microsecond level as well as being prone to discontinuous jumps in system time. Using clock_gettime with CLOCK_MONOTONIC gives gr