On 08/17/2016 12:57 AM, Michael Rolnik wrote:
another question. is it possible to measure number of executed instruction between two calls to device read/write functions?
Not really.
I know there is qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) function, but it requires to assume that icount is used and CPU frequence.
Indeed, which is why it's generally good enough to invent a plausible cpu frequency and use the (virtual) wall clock for the cycle counter.
See, for instance, target-alpha/sys_helper.c, helper_load_pcc. r~